utils library

Classes

CLanguage
CodeToken
Represents a token in code for syntax highlighting
CppLanguage
Language
Base language class for syntax highlighting
Tag
Represents a tag definition in Pendown
Token
Represents a token in the Pendown markup

Enums

CodeTokenType
Enum for code token types

Extensions

StringUtils on String

Functions

getCleanedText(String text, int tabulationSpaceCount) String
Get cleaned text with normalized line endings and tabs replaced
getColor(String color) Color
Convert a hex color string to a Flutter Color object
getFormat(String url) String
Get the file format from a URL
getHexadecimalCharacterValue(String character) int
Get the value of a hexadecimal character
getImageSource(String url, String format) String
Get the image source for an image
getLanguage(String filePath, String fileExtension) Language
Get the appropriate language for a file extension
hasUnit(String size) bool
Check if a size has a CSS unit
isAlphabeticalCharacter(String character) bool
Check if a character is alphabetical
isDecimalCharacter(String character) bool
Check if a character is decimal
isHexadecimalCharacter(String character) bool
Check if a character is hexadecimal
isImageFormat(String format) bool
Check if a format is an image format
replaceTabulations(String text, int tabulationSpaceCount) String
Replace tabulations with spaces