implicit final class S_Mach_String_StringPML extends AnyVal
- Alphabetic
- By Inheritance
- S_Mach_String_StringPML
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new S_Mach_String_StringPML(self: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
collapseDelims(delimiterSubst: String)(implicit lexer: Lexer): String
Collapse all delimiters to the same string and trim all leading and trailing delimiters
Collapse all delimiters to the same string and trim all leading and trailing delimiters
- delimiterSubst
string to replace delimiter runs with
- returns
string with all delimiters collapsed to delimiterSubst and all leading and trailing delimiters trimmed
- Annotations
- @inline()
-
def
collapseWhitespace: String
- returns
string with all whitespace collapsed to a single space and all leading and trailing whitespace trimmed
- Annotations
- @inline()
-
def
convert[A](f: (String) ⇒ A): Option[A]
Parse a string to some type
Parse a string to some type
- f
function to parse string to type
- returns
None if String fails to convert to A OR Some(A) if string can be converted to a valid A value
- Annotations
- @inline()
-
def
ensureSuffix(suffix: String): String
- suffix
string to ensure is at the end of the string
- returns
string with suffix appended if string does not end with suffix
- Annotations
- @inline()
-
def
findAllReplace(zomFindReplace: Seq[(Seq[String], String)], caseSensitive: Boolean): String
Replace string sections by matching from a set of string literals and replacing with a replacement string literal.
Replace string sections by matching from a set of string literals and replacing with a replacement string literal.
- zomFindReplace
zero or more (find string literal, replace string literal) tuples
- caseSensitive
TRUE to for case-sensitive matching FALSE otherwise
- returns
string with all replacements. For each (find*,replace) pair, any occurrences of any find are substituted with replace. See note1 above.
- Annotations
- @inline()
-
def
findAllReplaceTokens(zomFindReplace: Seq[(Seq[String], String)], caseSensitive: Boolean = true)(implicit lexer: Lexer): String
Replace tokens in string sections by matching from a set of string literals to a replacement string literal.
Replace tokens in string sections by matching from a set of string literals to a replacement string literal.
- zomFindReplace
zero or more (find string literal, replace string literal) tuples
- caseSensitive
TRUE to for case-sensitive matching FALSE otherwise
- returns
string with all replacements. For each (find*,replace) pair, any occurrences of any find are substituted with replace. See note1 above.
- Annotations
- @inline()
-
def
findRegexReplace(zomRegex: Seq[(Regex, String)]): String
Replace string sections by matching regex and replacing with a string literal.
Replace string sections by matching regex and replacing with a string literal.
- zomRegex
zero or more (regex, replacement string literal) tuples
- returns
string with all occurrences of regex replaced with the paired string. See note1 above.
- Annotations
- @inline()
-
def
findRegexReplaceMatch(zomRegex: Seq[(Regex, (Match) ⇒ String)]): String
Replace string sections by matching regex and replacing with result of match function.
Replace string sections by matching regex and replacing with result of match function.
- zomRegex
zero or more (regex, match function) tuples
- returns
string with all occurrences of regexes replaced with the string returned by passing the match generated by the regex to the paired function. See note1 above.
- Annotations
- @inline()
-
def
findReplace(zomFindReplace: Seq[(String, String)], caseSensitive: Boolean = true): String
Replace string sections by matching string literal with a replacement string literal.
Replace string sections by matching string literal with a replacement string literal.
- zomFindReplace
zero or more (find string literal, replace string literal) tuples
- caseSensitive
TRUE to for case-sensitive matching FALSE otherwise
- returns
string with all replacements. For each (find,replace) pair, all occurrences of find that match regions of the string substituted with replace. See note1 above.
- Annotations
- @inline()
-
def
findReplaceTokens(zomFindReplace: Seq[(String, String)], caseSensitive: Boolean = true)(implicit lexer: Lexer): String
Replace tokens in a string by matching string literal and replacing with a replacement string literal.
Replace tokens in a string by matching string literal and replacing with a replacement string literal.
- zomFindReplace
zero or more (find string literal, replace string literal) tuples
- caseSensitive
TRUE to for case-sensitive matching FALSE otherwise
- returns
string with all replacements. For each (find,replace) pair, all occurrences of find that match a token exactly are substituted with replace. See note1 above.
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
indent(n: Int, spacer: String = " "): String
- n
number of spacers to indent with
- spacer
the spacer string to use while indenting
- returns
string with all lines indented by n occurrences of s
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lex(implicit lexer: Lexer): LexResult
- returns
lazily separate all tokens and delimiters contained in string
- Annotations
- @inline()
-
def
mapTokens(f: (String) ⇒ String)(implicit lexer: Lexer): String
In-place transform tokens in the string preserving delimiters
In-place transform tokens in the string preserving delimiters
- f
function to map tokens
- returns
a string with all tokens replaced with the result of passing the token to f. all delimiters is preserved
- Annotations
- @inline()
- val self: String
-
def
toCamelCase(implicit lexer: Lexer): String
- returns
all tokens camel-cased i.e. camelCase
- Annotations
- @inline()
-
def
toDoubleOpt: Option[Double]
- returns
None if String fails to convert to Double OR Some(Double) if string can be converted to a valid Double value
- Annotations
- @inline()
-
def
toIntOpt: Option[Int]
- returns
None if String fails to convert to Int OR Some(Int) if string can be converted to a valid Int value
- Annotations
- @inline()
-
def
toLongOpt: Option[Long]
- returns
None if String fails to convert to Long OR Some(Long) if string can be converted to a valid Long value
- Annotations
- @inline()
-
def
toOption: Option[String]
- returns
None if string length is 0 OR Some(String) if length > 0
- Annotations
- @inline()
-
def
toPascalCase(implicit lexer: Lexer): String
- returns
all tokens camel-cased i.e. CamelCase
- Annotations
- @inline()
-
def
toProperCase: String
- returns
the first character to uppercase and the remaining characters to lowercase
- Annotations
- @inline()
-
def
toSnakeCase(implicit lexer: Lexer): String
- returns
all tokens camel-cased i.e. camel_case
- Annotations
- @inline()
-
def
toString(): String
- Definition Classes
- Any
-
def
toTitleCase(implicit lexer: Lexer): String
- returns
each token in proper case with delimiter preserved
- Annotations
- @inline()
-
def
toTokens(implicit lexer: Lexer): Iterator[String]
- returns
all tokens contained in string
- Annotations
- @inline()