Skip to content

Analysis

Spice
import "std/text/analysis";

Functions

isWhitespace

Spice
public inline f<bool> isWhitespace(char c)

Checks if the given character is a whitespace

Parameters

Name Type Description
c char

Returns: bool — Is whitespace

isLower

Spice
public inline f<bool> isLower(char c)

Checks if the given character is a lowercase alpha character

Parameters

Name Type Description
c char

Returns: bool — Is lowercase alpha

isUpper

Spice
public inline f<bool> isUpper(char c)

Checks if the given character is a uppercase alpha character

Parameters

Name Type Description
c char

Returns: bool — Is uppercase alpha

isAlpha

Spice
public inline f<bool> isAlpha(char c)

Checks if the given character is a alpha character

Parameters

Name Type Description
c char

Returns: bool — Is alpha

isAlphaUnderscore

Spice
public inline f<bool> isAlphaUnderscore(char c)

Checks if the given character is a alpha character or underscore

Parameters

Name Type Description
c char

Returns: bool — Is alpha or underscore

isAlphaNum

Spice
public inline f<bool> isAlphaNum(char c)

Checks if the given character is a alphanumeric character

Parameters

Name Type Description
c char

Returns: bool — Is alphanumeric

isAlphaNumUnderscore

Spice
public inline f<bool> isAlphaNumUnderscore(char c)

Checks if the given character is a alphanumeric character or underscore

Parameters

Name Type Description
c char

Returns: bool — Is alphanumeric or underscore

isDigit

Spice
public inline f<bool> isDigit(char c)

Checks if the given character is a digit

Parameters

Name Type Description
c char

Returns: bool — Is digit

isDecDigit

Spice
public inline f<bool> isDecDigit(char c)

Checks if the given character is a decimal digit

Parameters

Name Type Description
c char

Returns: bool — Is decimal digit

isHexDigit

Spice
public inline f<bool> isHexDigit(char c)

Checks if the given character is a hexadecimal digit

Parameters

Name Type Description
c char

Returns: bool — Is hexadecimal digit

isOctDigit

Spice
public inline f<bool> isOctDigit(char c)

Checks if the given character is a octal digit

Parameters

Name Type Description
c char

Returns: bool — Is octal digit

isBinDigit

Spice
public inline f<bool> isBinDigit(char c)

Checks if the given character is a binary digit

Parameters

Name Type Description
c char

Returns: bool — Is binary digit

is

Spice
public inline f<bool> is(char c, char expected)

Checks if the given character match an expected character

Parameters

Name Type Description
c char
expected char

Returns: bool — Is matching expected character

isBetween

Spice
public inline f<bool> isBetween(char c, char min, char max)

Checks if the given character is included in a range of characters

Parameters

Name Type Description
c char
min char
max char

Returns: bool — Is between min and max