JLStringUtilities

jutils.spad line 154 [edit on github]

This package provides Julia facilities that operate on strings.

jlLatex: String -> String

jlLatex(str) returns the String corresponding to a Julia LaTeX expression, that is, “L”str”” if your Julia installation supports 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 Julia 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 Julia. 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

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

jlSubstitute: String -> String

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

jlToLatex: String -> String

jlToLatex(str) converts the string str to LaTeX for supported expressions. The Julia package Latexify needs to be installed. jlToLatex(“sin(sqrt(2))”) => “$sinleft( sqrt{2} right)$”