Skip to main content
Home

The char package contains function to work with characters such as isUpper, isLower, isDigit, toLower, toUpper, isWhiteSpace, isAscii, isLatin1

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
70%
Published
9 months ago (0.2.0)
c
Char

Represents a unicode character (code point).

v
CHAR_0
No documentation available
v
CHAR_9
No documentation available
v
CHAR_AMPERSAND
No documentation available
v
CHAR_AT
No documentation available
v
CHAR_BACKWARD_SLASH
No documentation available
v
CHAR_CARRIAGE_RETURN
No documentation available
v
CHAR_CIRCUMFLEX_ACCENT
No documentation available
v
CHAR_COLON
No documentation available
v
CHAR_DOT
No documentation available
v
CHAR_DOUBLE_QUOTE
No documentation available
v
CHAR_EQUAL

Equal character (=) code (61).

v
CHAR_EXCLAMATION_MARK
No documentation available
v
CHAR_FORM_FEED
No documentation available
v
CHAR_FORWARD_SLASH
No documentation available
v
CHAR_GRAVE_ACCENT
No documentation available
v
CHAR_HASH
No documentation available
v
CHAR_HYPHEN_MINUS
No documentation available
v
CHAR_LEFT_ANGLE_BRACKET
No documentation available
v
CHAR_LEFT_CURLY_BRACKET
No documentation available
v
CHAR_LEFT_SQUARE_BRACKET
No documentation available
v
CHAR_LINE_FEED
No documentation available
v
CHAR_LOWERCASE_A
No documentation available
v
CHAR_LOWERCASE_Z
No documentation available
v
CHAR_NO_BREAK_SPACE
No documentation available
v
CHAR_PERCENT
No documentation available
v
CHAR_PLUS
No documentation available
v
CHAR_QUESTION_MARK
No documentation available
v
CHAR_RIGHT_ANGLE_BRACKET
No documentation available
v
CHAR_RIGHT_CURLY_BRACKET
No documentation available
v
CHAR_RIGHT_SQUARE_BRACKET
No documentation available
v
CHAR_SEMICOLON
No documentation available
v
CHAR_SINGLE_QUOTE
No documentation available
v
CHAR_SPACE
No documentation available
v
CHAR_TAB
No documentation available
v
CHAR_UNDERSCORE
No documentation available
v
CHAR_UPPERCASE_A
No documentation available
v
CHAR_UPPERCASE_Z
No documentation available
v
CHAR_VERTICAL_LINE
No documentation available
v
CHAR_ZERO_WIDTH_NOBREAK_SPACE
No documentation available
f
charAt

Returns the character at the specified index of a string.

f
isAscii

Checks if the given value is an ASCII character.

f
isAsciiAt

Checks if the character at the specified index in the given string is an ASCII character.

f
isBetween

Checks if a character is between two other characters.

f
isDigit

Checks if the given value is a digit.

f
isDigitAt

Checks if the character at the specified index in the given string is a digit.

f
isDigitUtf16At

Checks if the character at the specified index in the given string is a digit.

f
isLatin1

Checks if the given value is a Latin-1 character.

f
isLatin1At

Checks if the character at the specified index in the given string is a Latin-1 character. Latin-1 characters have code points less than the latinMax constant.

f
isLetter

Checks if the given value represents a letter.

f
isLetterAt

Checks if the character at the specified index in the given string is a letter.

f
isLetterOrDigit

Checks whether the given value is a letter or a digit.

f
isLetterOrDigitAt

Checks whether the character at the specified index in the given string is a letter or digit.

f
isLetterOrDigitUtf16At

Checks whether the character at the specified index in the given string is a letter or a digit in UTF-16 encoding.

f
isLetterUtf16At

Checks if the character at the specified index in the given string is a UTF-16 letter.

f
isLower

Checks if the given value represents a lowercase character.

f
isLowerAt

Checks if the character at the specified index in the given string is a lowercase letter.

f
isLowerUtf16

Checks if the given UTF-16 value represents a lowercase character.

f
isLowerUtf16At

Checks if the character at the specified index in the given string is a lowercase UTF-16 character.

f
isUpper

Checks if the given value represents an uppercase character.

f
isUpperAt

Checks if the character at the specified index in the given string is an uppercase letter.

f
isUpperUtf16

Checks if the given UTF-16 value represents an uppercase character.

f
isUpperUtf16At

Checks if the character at the specified index in the given string is an uppercase UTF-16 character.

f
isWhiteSpace

Checks if the given character is a whitespace character.

f
isWhiteSpaceAt

Checks if the character at the specified index in the given string is a whitespace character.

f
toLower

Converts the given Unicode code point to its lowercase equivalent. If the code point is already lowercase or non-letter, it returns the same value. If the code point represents an uppercase letter, it converts it to lowercase. If the code point represents a titlecase or uppercase letter with a specific locale, it converts it to lowercase based on the specified locale.

f
toLowerUtf16

Converts the given UTF-16 code unit to its lowercase equivalent. If the code unit represents an uppercase letter, it is converted to lowercase. If the code unit is already lowercase or a non-letter, it is returned as is. If the code unit is not a valid Unicode character, undefined is returned.

f
toUpper

Converts a lowercase letter to uppercase. If the input value is already uppercase or a non-letter, it returns the input value as is. If the input value is a lowercase letter, it converts it to uppercase using the specified locales.

f
toUpperUtf16

Converts a UTF-16 character code to its uppercase equivalent.

c
Char

Represents a unicode character (code point).

v
CHAR_0
No documentation available
v
CHAR_9
No documentation available
v
CHAR_AMPERSAND
No documentation available
v
CHAR_AT
No documentation available
v
CHAR_BACKWARD_SLASH
No documentation available
v
CHAR_CARRIAGE_RETURN
No documentation available
v
CHAR_CIRCUMFLEX_ACCENT
No documentation available
v
CHAR_COLON
No documentation available
v
CHAR_DOT
No documentation available
v
CHAR_DOUBLE_QUOTE
No documentation available
v
CHAR_EQUAL

Equal character (=) code (61).

v
CHAR_EXCLAMATION_MARK
No documentation available
v
CHAR_FORM_FEED
No documentation available
v
CHAR_FORWARD_SLASH
No documentation available
v
CHAR_GRAVE_ACCENT
No documentation available
v
CHAR_HASH
No documentation available
v
CHAR_HYPHEN_MINUS
No documentation available
v
CHAR_LEFT_ANGLE_BRACKET
No documentation available
v
CHAR_LEFT_CURLY_BRACKET
No documentation available
v
CHAR_LEFT_SQUARE_BRACKET
No documentation available
v
CHAR_LINE_FEED
No documentation available
v
CHAR_LOWERCASE_A
No documentation available
v
CHAR_LOWERCASE_Z
No documentation available
v
CHAR_NO_BREAK_SPACE
No documentation available
v
CHAR_PERCENT
No documentation available
v
CHAR_PLUS
No documentation available
v
CHAR_QUESTION_MARK
No documentation available
v
CHAR_RIGHT_ANGLE_BRACKET
No documentation available
v
CHAR_RIGHT_CURLY_BRACKET
No documentation available
v
CHAR_RIGHT_SQUARE_BRACKET
No documentation available
v
CHAR_SEMICOLON
No documentation available
v
CHAR_SINGLE_QUOTE
No documentation available
v
CHAR_SPACE
No documentation available
v
CHAR_TAB
No documentation available
v
CHAR_UNDERSCORE
No documentation available
v
CHAR_UPPERCASE_A
No documentation available
v
CHAR_UPPERCASE_Z
No documentation available
v
CHAR_VERTICAL_LINE
No documentation available
v
CHAR_ZERO_WIDTH_NOBREAK_SPACE
No documentation available
E
UnicodeCategory
No documentation available
f
charAt

Returns the character at the specified index of a string.

f
isAscii

Checks if the given value is an ASCII character.

f
isAsciiAt

Checks if the character at the specified index in the given string is an ASCII character.

f
isBetween

Checks if a character is between two other characters.

f
isDigit

Checks if the given value is a digit.

f
isDigitAt

Checks if the character at the specified index in the given string is a digit.

f
isDigitUtf16At

Checks if the character at the specified index in the given string is a digit.

f
isLatin1

Checks if the given value is a Latin-1 character.

f
isLatin1At

Checks if the character at the specified index in the given string is a Latin-1 character. Latin-1 characters have code points less than the latinMax constant.

f
isLetter

Checks if the given value represents a letter.

f
isLetterAt

Checks if the character at the specified index in the given string is a letter.

f
isLetterOrDigit

Checks whether the given value is a letter or a digit.

f
isLetterOrDigitAt

Checks whether the character at the specified index in the given string is a letter or digit.

f
isLetterOrDigitUtf16At

Checks whether the character at the specified index in the given string is a letter or a digit in UTF-16 encoding.

f
isLetterUtf16At

Checks if the character at the specified index in the given string is a UTF-16 letter.

f
isLower

Checks if the given value represents a lowercase character.

f
isLowerAt

Checks if the character at the specified index in the given string is a lowercase letter.

f
isLowerUtf16

Checks if the given UTF-16 value represents a lowercase character.

f
isLowerUtf16At

Checks if the character at the specified index in the given string is a lowercase UTF-16 character.

f
isUpper

Checks if the given value represents an uppercase character.

f
isUpperAt

Checks if the character at the specified index in the given string is an uppercase letter.

f
isUpperUtf16

Checks if the given UTF-16 value represents an uppercase character.

f
isUpperUtf16At

Checks if the character at the specified index in the given string is an uppercase UTF-16 character.

f
isWhiteSpace

Checks if the given character is a whitespace character.

f
isWhiteSpaceAt

Checks if the character at the specified index in the given string is a whitespace character.

f
toLower

Converts the given Unicode code point to its lowercase equivalent. If the code point is already lowercase or non-letter, it returns the same value. If the code point represents an uppercase letter, it converts it to lowercase. If the code point represents a titlecase or uppercase letter with a specific locale, it converts it to lowercase based on the specified locale.

f
toLowerUtf16

Converts the given UTF-16 code unit to its lowercase equivalent. If the code unit represents an uppercase letter, it is converted to lowercase. If the code unit is already lowercase or a non-letter, it is returned as is. If the code unit is not a valid Unicode character, undefined is returned.

f
toUpper

Converts a lowercase letter to uppercase. If the input value is already uppercase or a non-letter, it returns the input value as is. If the input value is a lowercase letter, it converts it to uppercase using the specified locales.

f
toUpperUtf16

Converts a UTF-16 character code to its uppercase equivalent.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.