s_mach.string

SMach_String_PimpMyString

implicit final class SMach_String_PimpMyString extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SMach_String_PimpMyString
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SMach_String_PimpMyString(self: String)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def collapseGlue(glueSubst: String)(implicit splitter: WordSplitter): String

    Collapse all glue to the same string and trim all leading and trailing glue

    Collapse all glue to the same string and trim all leading and trailing glue

    glueSubst

    string to replace glue runs with

    returns

    string with all glue collapsed to glueSubst and all leading and trailing glue trimmed

    Annotations
    @inline()
  6. def collapseWhitespace: String

    returns

    string with all whitespace collapsed to a single space and all leading and trailing whitespace trimmed

    Annotations
    @inline()
  7. 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()
  8. 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()
  9. 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()
  10. def findAllReplaceWords(zomFindReplace: Seq[(Seq[String], String)], caseSensitive: Boolean = true)(implicit splitter: WordSplitter): String

    Replace words in string sections by matching from a set of string literals to a replacement string literal.

    Replace words 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()
  11. 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()
  12. 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()
  13. 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()
  14. def findReplaceWords(zomFindReplace: Seq[(String, String)], caseSensitive: Boolean = true)(implicit splitter: WordSplitter): String

    Replace words in a string by matching string literal and replacing with a replacement string literal.

    Replace words 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 word exactly are substituted with replace. See note1 above.

    Annotations
    @inline()
  15. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  16. 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()
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def mapWords(f: (String) ⇒ String)(implicit splitter: WordSplitter): String

    f

    function to map words

    returns

    a string with all words replaced with the result of passing the word to f. all glue is preserved

    Annotations
    @inline()
  19. val self: String

  20. def toCamelCase(implicit splitter: WordSplitter): String

    returns

    all words camel-cased i.e. camelCase

    Annotations
    @inline()
  21. 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()
  22. 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()
  23. 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()
  24. def toOption: Option[String]

    returns

    None if string length is 0 OR Some(String) if length > 0

    Annotations
    @inline()
  25. def toPascalCase(implicit splitter: WordSplitter): String

    returns

    all words camel-cased i.e. CamelCase

    Annotations
    @inline()
  26. def toProperCase: String

    returns

    the first character to uppercase and the remaining characters to lowercase

    Annotations
    @inline()
  27. def toSnakeCase(implicit splitter: WordSplitter): String

    returns

    all words camel-cased i.e. camel_case

    Annotations
    @inline()
  28. def toString(): String

    Definition Classes
    Any
  29. def toTitleCase(implicit splitter: WordSplitter): String

    returns

    each word in proper case with glue preserved

    Annotations
    @inline()
  30. def toWords(implicit splitter: WordSplitter): Iterator[String]

    returns

    all words contained in string

    Annotations
    @inline()
  31. def toWordsWithGlue(implicit splitter: WordSplitter): WordSplitResult

    returns

    all words and glue contained in string

    Annotations
    @inline()

Inherited from AnyVal

Inherited from Any

Ungrouped