JLStringUtilities

jutils.spad line 122 [edit on github]

This package provides JL facilities that operate on strings.

jlLatex: String -> String

jlLatex(str) returns the String corresponding to a JL LaTeX expression, that is, “L”str”” if your JL support it (LaTeXStrings package). Convenience function.

jlMessageStyled: (String, JLSymbol) -> Void

jlMessageStyled(message, color) print the message with formatted color (english color). For example jlMessageStyled(“I AM HERE!!!”, “red”)

jlMessageStyled: String -> Void

jlMessageStyled(message) print the message with formatted style within braces (I am {red:here}). For example: jlMessageStyled(“{red:■} {green:■} {yellow:■} {blue:■} {magenta:■} {cyan:■}”)

jlRegex: String -> String

jlRegex(str) returns the String corresponding to a JL regular expression, that is, “r_str_””. Convenience function.

jlRegexMatch?: (String, String) -> Boolean

jlRegexMatch?(s, regex) checks if the regular expression matches in s.

jlRegexMatch: (String, String) -> AssociationList(String, String)

jlRegexMatch(s, regex) returns the matched regular expressions in s.

jlRegexMatch: (String, String) -> List String

jlRegexMatch(s, regex) returns the matched regular expressions in s.

jlRegexMatch: (String, String) -> String

jlRegexMatch(s, regex) returns the matched regular expression in s.

jlRegexMatch: (String, String, PositiveInteger) -> AssociationList(String, String)

jlRegexMatch(s, regex, i) returns the matched regular expressions in s, starting at index i.

jlRegexMatch: (String, String, PositiveInteger) -> List String

jlRegexMatch(s, regex, i) returns the matched regular expressions in s, starting at index i.

jlRegexMatch: (String, String, PositiveInteger) -> String

jlRegexMatch(s, regex, i) returns the matched regular expression in s, starting at index i.

jlRegexReplace: (String, String, String) -> String

jlRegexReplace(str, regex, subst) will replace captured regular expressions in str with subst. More information in String documentation of JL. For example: jlRegexReplace(“hey”, jlRegex(”$”), jlSubstitute(” you!”))

jlSplit: (String, String) -> List String

jlSplit(str, delims) split str with delimiter(s) delims (a string or a regular expression). Equivalent to jlSplit(str, delims, 0).

jlSplit: (String, String, NonNegativeInteger) -> List String

jlSplit(str, delims, n) split str with delimiter(s) delims (a string or a regular expression). Return a list of size n. Parse entirely str if n = 0.

jlString: String -> String

jlString(str) costructs an escaped string usable by the Julie parser.

jlStyled: String -> String

jlLatex(str) returns the String corresponding to a JL LaTeX expression, that is, “styled_str_”” if your JL support it. (StyledStrings official package). Convenience function.

jlSubstitute: String -> String

jlSubstitute(str) returns the String corresponding to a JL subtitute expression, that is, “s_str_””. Convenience function.