Menu

Tree [9e4bd8] default tip /
 History

Read Only access


File Date Author Commit
 docs 2025-06-28 ggb ggb [30fa83] Added match_to_eos()
 .hgignore 2025-04-26 ggb ggb [756eff] Initial load, working code
 .hgtags 2025-06-28 ggb ggb [9e4bd8] Moved tag V0-latest to changeset 30fa8316d709 (...
 README.md 2025-06-28 ggb ggb [30fa83] Added match_to_eos()
 docgen.sh 2025-04-28 ggb ggb [7e5aa0] Added natch_any
 docs.html 2025-04-28 ggb ggb [7e5aa0] Added natch_any
 string_extras.nim 2025-06-28 ggb ggb [30fa83] Added match_to_eos()
 string_extras.nimble 2025-06-28 ggb ggb [30fa83] Added match_to_eos()

Read Me

Extra utility functions for Nim strings

More details can be found in the code comments or the documentation that can be generated from those comments.

Functions

match_eos

Test if given position is within bounds of a given string.

match_to_eos

Test if totality of string matches specified match criteria.

match_true

Skip over input characters that match condition and return offset
to first character that fails to meet specified condition.

match_false

Skip over input characters that do not match condition and return
offset to first character that does match the condition.

match_quote_len

Return number of characters at start of string until closing quote or bracket.

match_word_boundaries

Return offsets to start and end of next word.

match_token_boundaries

Return offsets to start and end of next arbitrary token.

match_indentifier_boundaries

Return offsets to start and end of next valid identifier.

match_until

Return substring that starts at beginning of string and contains characters until condition is met.

match_prefix

Test that short string matches start of long string.

match_any

Compare string to array of options

split_at

Split string into a tuple pair.

random_text

Return random gibberish using English phonemes.

Installation

    nimble install "http://hg.code.sf.net/p/nim-string-extras/code#V0-latest"
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.