final class _Class extends AnyVal with Any.Datum.String[Style]

Ordering
  1. Alphabetic
Inherited
  1. Style
  2. Any.Datum.String
  3. Custom.String._library._transform
  4. Custom.String._library._substring
  5. Any.Able.CopyRange
  6. Custom.String._library._modify
  7. Custom.String._library._evaluate
  8. Custom.String._library._evaluate._check
  9. Custom.String._library._evaluate._search
  10. Custom.String._library._evaluate._compare
  11. java.lang.Comparable
  12. Any.Datum.Comparable
  13. Any.Datum.Ref
  14. Any.Datum
  15. Any.Wrap
  16. scala.AnyVal
  17. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Constructor

  1. new Style(real: String)
    Definition Classes
    _Class

Constant

  1. val real: String
    Definition Classes
    _Class_Trait

Method

  1. def allChars: ~[Char]

    Stream of Chars

    Stream of Chars

    Returns String as a Stream of [Char]]

    "abcd".allChars lp // Prints: ~(a, b, c, d)
    Definition Classes
    _transform
  2. def allIndexesOf(sub: String, from: Opt.Int = \/): ~[Int]

    Stream of indexes

    Stream of indexes

    Stream of indexes for each occurrence of real

    "abcd_abcd_abcd_abcd_abcd".allIndexesOf("bc") lp // Prints: ~(1, 6, 11, 16, 21)
    from

    position to start looking from

    Definition Classes
    _search
  3. def allLines: ~[String]

    Stream of lines

    Stream of lines

    Creates a Stream of Strings representing lines (delimited by '\n') of this text

    "abc\n def\n xyz".allLines.lp // Prints: ~(abc,  def,  xyz)
    Definition Classes
    _transform
  4. def allSubstrings(size: Int): ~[String]

    Stream of substrings

    Stream of substrings

    Returns String as a Stream of substrings of given size

    Note: Last substring may be shorter

    ("abc" * 10) lp
    
    ("abc" * 10).allSubstrings(4) lp
    
    // Output
    abcabcabcabcabcabcabcabcabcabc
    ~(abca, bcab, cabc, abca, bcab, cabc, abca, bc)
    Definition Classes
    _transform
  5. def allTokenized(separators: ~[String]): ~[(String, Idx.Range, String)]

    Stream of tokens

    Stream of tokens

    Multi token tokenizetion

    Returns a Tuple including:

    • Separator preceding the token, empty for the first token
    • Idx.Range of the token in the text
    • String token
    val str: String = (1 <> 40).all.format()
    "Text to Tokenize:".lp.lp
    str.lp.lp
    ("Token", "Range", "String").lp
    str.replaceAll("\n", "_").allTokenized("000" ~+ "111" + "222" + "333" + "444").tp
    
    // Output
    
    Text to Tokenize:
    
    12345678910111213141516171819202122232425262728293031323334353637383940
    
    (Token,Range,String)
    --- --------- -------------------
    ?   ?         ?
    --- --------- -------------------
        0 <>> 11  12345678910
    111 14 <>> 33 2131415161718192021
    222 36 <>> 55 3242526272829303132
    333 58 <>> 71 4353637383940
    --- --------- -------------------
    separators

    a Stream of text separators to consider

    Definition Classes
    _transform
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def charAt(i: Int): Char

    Char at position

    Char at position

    Returns Char at the specified position

    Definition Classes
    _search
  8. def charAtOpt(i: Int): Opt[Char]

    Char at position

    Char at position

    Optionally Returns Char at the specified position

    Opt.Void is returned if specified position is out of String range

    if(<name>.charAtOpt(2).let(_.isUpper)) App.Fail.toDo
    // is equivalent
    if(<name>.length >=2 && <name>.charAt(2).isUpper) App.Fail.toDo
    Definition Classes
    _search
  9. def charIndexOpt(f: (Char) ⇒ Boolean, from: Opt.Int = \/): Opt.Int

    Char index

    Char index

    Optionally returns index of the first Char passing the filter function

    "abcd_abcd_".charIndexOpt(_ >= 'd', 4) lp // Prints: Opt(8)
    "abcd_abcd_".charIndexOpt('x' <> 'z') lp  // Prints: Opt.Void
    from

    position to start looking from

    Definition Classes
    _search
  10. def compareTo(that: String): Int
    Definition Classes
    _compare → Comparable
  11. def contains(sub: String): Boolean

    Contains check

    Contains check

    Returns true is this String contains that String

    "abc".contains("cd") lp // Prints: false
    Definition Classes
    _check
  12. def copy(r: Idx.Range): Style

    Copy range

    Copy range

    Copies elements within the range specified

    // Generic String example
    "abcdefghi".copy(3 <> 5).lp  // Prints: def
    Definition Classes
    _substringCopyRange
  13. def copyAfter(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy end

    Copy end

    Copies String from the position where the specified real found plus the length of the real

    If no real found, default real is returned, or original if default is void

    "abcdefg".copyAfter("cd") lp // Prints: efg
    Definition Classes
    _substring
  14. def copyAfterLast(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy end

    Copy end

    Copies String from the last position the specified real found plus the length of the real

    If no real found, default real is returned, or original if default is void.

    "abcd_abcd_abcd".copyFromLast("ab") lp // Prints: cd
    from

    string last position to start looking from end to start

    Definition Classes
    _substring
  15. def copyBefore(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy start

    Copy start

    Copies String from the beginning until specified real found

    If no real found, default real is returned, or original if default is void

    "abcdefg".copyBefore("ef") lp // Prints: abcd
    Definition Classes
    _substring
  16. def copyBeforeLast(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy start

    Copy start

    Copies String from the beginning until the last occurrence of specified real found

    If no real found, default real is returned, or original if default is void

    "abcd_abcd_abcd".copyBeforeLast("ab") lp // Prints: abcd_abcd_
    from

    string last position to start looking from end to start

    Definition Classes
    _substring
  17. def copyDrop(r: Idx.Range): Style

    Copy without range

    Copy without range

    Copies elements outside the range specified

    // Generic String example
    "abcdefghi".copyDrop(3 <> 5).lp  // Prints: abcghi
    Definition Classes
    _substringCopyRange
  18. def copyFirst(number: Int): Style

    Copy start

    Copy start

    Copies specified number of first elements

    // Generic String example
    "abcdefghi".copyFirst(3).lp  // Prints: abc
    Definition Classes
    CopyRange
  19. def copyFrom(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy end

    Copy end

    Copies String from the position where the specified real found

    If no real found, default real is returned, or original if default is void

    "abcdefg".copyFrom("cd") lp // Prints: cdefg
    Definition Classes
    _substring
  20. def copyFrom(position: Int): Style

    Copy end

    Copy end

    Copies elements from specified position to the end

    // Generic String example
    "abcdefghi".copyFrom(5).lp  // Prints: fghi
    Definition Classes
    CopyRange
  21. def copyFromLast(sub: String, default: Opt[String] = \/, from: Opt.Int = \/): Style

    Copy end

    Copy end

    Copies String from the last position the specified real found

    If no real found, default real is returned, or original if default is void.

    "abcd_abcd_abcd".copyromLast("ab") lp // Prints: abcd
    from

    string last position to start looking from end to start

    Definition Classes
    _substring
  22. def copyFull: Style

    Copy everything

    Copy everything

    Copies entire content

    Definition Classes
    CopyRange
  23. def copyLast(number: Int): Style

    Copy end

    Copy end

    Copies specified number of elements at the end

    // Generic String example
    "abcdefghi".copyLast(3).lp  // Prints: ghi
    Definition Classes
    CopyRange
  24. def copyShort(cnt: Int): Style

    Copy without end

    Copy without end

    Copies from the beginning, missing specified number of elements at the end

    // Generic String example
    "abcdefghi".copyShort(3).lp  // Prints: abcdef
    Definition Classes
    CopyRange
  25. def endsWith(sub: String): Boolean

    Check if ends with

    Check if ends with

    Returns true this String ends with that String

    "abc".endsWith("bc") lp // Prints: true
    Definition Classes
    _check
  26. def equalsIgnoreCase(v: String): Boolean

    Check if equals ignore case

    Check if equals ignore case

    Returns true this and that String are equal, if upper and lower case Chars are considered equal

    "aBc".equalsIgnoreCase("ABC").lp // Prints: true
    Definition Classes
    _check
  27. def indent(tag: String): String

    Indents text with the tahStream of lines

    Indents text with the tahStream of lines

    Indents text with the tag.

    Prefixes first line with the tag, other lines with tag equal space

    "abc\nde\nxyz".indent("Lines: ").lp
    // Output
    Lines: abc
           de
           xyz
    Definition Classes
    _transform
  28. def indexOfOpt(sub: String, from: Opt.Int = \/): Opt.Int

    Value position

    Value position

    Optionally returns position of the specified real

    "abcd_abcd_".indexOfOpt("d_a") lp // Prints: Opt(3)
    from

    position to start looking from

    Definition Classes
    _search
  29. def insertAt(i: Int, v: String): Style

    Insert at position

    Insert at position

    Creates new String with real inserted at the specified position

    "0123456789".insertAt(5,"abc") lp // Prints: 01234abc56789
    Definition Classes
    _modify
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def isLike(mask: String, ignoreCase: Boolean = false): Boolean

    Check if pattern

    Check if pattern

    Returns true if this matches that pattern with '%' wild card

    "ABCD".isLike("AB%") lp  // Prints: true
    "ABCD".isLike("AC%") lp  // Prints: false
    ignoreCase

    if true upper and lower case Chars are considered equal

    Definition Classes
    _check
  32. def isVoid: Boolean
    Definition Classes
    _check
  33. def label: Style

    Capitalize

    Capitalize

    Capitalizes first character of every word (separated by white spaces)

    "all string ops".label lp // Prints: All String Ops
    Definition Classes
    _modify
  34. def lastCharIndexOpt(f: (Char) ⇒ Boolean, fromOpt: Opt.Int = \/): Opt.Int

    Char index

    Char index

    Optionally returns index of the last Char passing the filter function

    "abcd_abcd_".lastCharIndexOpt(_ >= 'd', 4) lp // Prints: Opt(3)
    "abcd_abcd_".lastCharIndexOpt('x' <> 'z') lp  // Prints: Opt.Void
    Definition Classes
    _search
  35. def lastIndexOfOpt(sub: String, from: Opt.Int = \/): Opt.Int

    Value position

    Value position

    Optionally returns last position of the specified real

    "abcd_abcd_abcd_".lastIndexOfOpt("d_a") lp // Prints: Opt(8)
    from

    last position to start looking from end to start

    Definition Classes
    _search
  36. def lower: Style

    toLowerCase

    toLowerCase

    Creates new String with all upper case Chars changed to lower case

    "ABc".lower lp // Prints: abc
    Definition Classes
    _modify
  37. def make(v: String): Style
    Attributes
    protected
    Definition Classes
    _Trait_Trait
  38. def padEndTo(targetLength: Int, pad: String = " "): Style

    Pad end

    Pad end

    Pads end of string to targetLength

    pad

    string to pad with.

    "ABC".padEndTo(10,"_") lp // Prints: ABC_______
    Definition Classes
    _modify
  39. def padStartTo(targetLength: Int, pad: String = " "): Style

    Pad start

    Pad start

    Pads start of string to targetLength

    pad

    string to pad with.

    "ABC".padStartTo(10,"_") lp // Prints: _______ABC
    Definition Classes
    _modify
  40. def remove(sub: String): Style

    Remove all

    Remove all

    Creates new String with all occurrences of real removed

    "123123123123".remove("2") lp // Prints: 13131313
    Definition Classes
    _modify
  41. def replace(value: String, target: String): Style

    Replace all

    Replace all

    Creates new String with all occurrences of real replaced with target

    "123123123123".replace("2","_") lp // Prints: 1_31_31_31_3
    Definition Classes
    _modify
  42. def replace(r: Idx.Range, v: String): Style

    Replace range with real

    Replace range with real

    Creates new String with all occurrences of real replaced with target

    "0123456789".replace(3 <> 7 ,"_") lp // Prints: 012_89
    Definition Classes
    _modify
  43. def setup: Style.type
    Attributes
    protected
    Definition Classes
    _Class_Trait_Trait_Trait
  44. def size: Int

    Container size

    Container size

    Notion of a range is only valid in presence of size

    Definition Classes
    _substringCopyRange
  45. def startsWith(sub: String): Boolean

    Check if begins with

    Check if begins with

    Returns true this String starts with that String

    "abc".startsWith("ab") lp // Prints: true
    Definition Classes
    _check
  46. def toBooleanOut: Out[Boolean]

    Boolean outcome conversion

    Boolean outcome conversion

    Converts String to Boolean outcome

    "true".toBooleanOut lp
    
    "abc".toBooleanOut lp
    
    // Output
    Out(true)
    Out(failure=For input string: "abc")
    Definition Classes
    _transform
  47. def toDoubleOut: Out[Double]

    Double outcome conversion

    Double outcome conversion

    Converts String to Double outcome

    "123.45".toDoubleOut lp
    
    "abc".toDoubleOut lp
    
    // Output
    Out(123.45)
    Out(failure=For input string: "abc")
    Definition Classes
    _transform
  48. def toIntOut: Out[Int]

    Int outcome conversion

    Int outcome conversion

    Converts String to Int outcome

    "123".toIntOut lp
    
    "abc".toIntOut lp
    
    // Output
    Out(123)
    Out(failure=For input string: "abc")
    Definition Classes
    _transform
  49. def toLongOut: Out[Long]

    Long outcome conversion

    Long outcome conversion

    Converts String to Long outcome

    "123".toLongOut lp
    
    "abc".toLongOut lp
    
    // Output
    Out(123)
    Out(failure=For input string: "abc")
    Definition Classes
    _transform
  50. def toString(): String
    Definition Classes
    _Trait → Any
  51. def trim: Style

    Trim both ends

    Trim both ends

    Trims both ends of String from space Chars

    Definition Classes
    _modify
  52. def trimBoth(f: (Char) ⇒ Boolean): Style

    Trim both ends

    Trim both ends

    Trims both ends of String from Chars defined by filter function

    "yyzzxxABCzzyyxx".trimBoth('x' <> 'z') lp                // Prints: ABC
    
    "yyzzxxABCzzyyxx".trimBoth(c => c == 'x' || c == 'y') lp // Prints: zzxxABCzz
    Definition Classes
    _modify
  53. def trimEnd(f: (Char) ⇒ Boolean): Style

    Trim both ends

    Trim both ends

    Trims end of String from Chars defined by filter function

    "ABCzzyyxx".trimEnd('x' <> 'z') lp                // Prints: ABC
    
    "ABCzzyyxx".trimEnd(c => c == 'x' || c == 'y') lp // Prints: ABCzz
    Definition Classes
    _modify
  54. def trimEnd: Style

    Trim end

    Trim end

    Trims end of String from space Chars

    Definition Classes
    _modify
  55. def trimStart(f: (Char) ⇒ Boolean): Style

    Trim start

    Trim start

    Trims start of String from Chars defined by filter function

    "yyzzxxABC".trimBoth('x' <> 'z') lp                // Prints: ABC
    
    "yyzzxxABC".trimBoth(c => c == 'x' || c == 'y') lp // Prints: zzxxABC
    Definition Classes
    _modify
  56. def trimStart: Style

    Trim start

    Trim start

    Trims start of String from space Chars

    Definition Classes
    _modify
  57. def undo(v: Style): String
    Definition Classes
    _Trait_modify
  58. def upper: Style

    toUpperCase

    toUpperCase

    Creates new String with all lower case Chars changed to upper case

    "aBc".upper lp // Prints: ABC
    Definition Classes
    _modify

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def +(v: Any): Style

    Plus

    Plus

    Creates a new instance with specified value added

    Definition Classes
    _Class_modify
  4. def +-(v: Any): Style
    Definition Classes
    _modify
  5. def +~(v: ~[Any]): Style

    Plus all

    Plus all

    Creates a new instance with added stream values

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