t

Custom.String._library._transform

trait _transform[TYPE] extends Any.Datum[TYPE, String]

Ordering
  1. Alphabetic
Inherited
  1. String._library._transform
  2. Any.Datum
  3. Any.Wrap
  4. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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 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
  3. 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
  4. 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
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def equals(arg0: Any): Boolean
    Definition Classes
    Any
  7. def hashCode(): Int
    Definition Classes
    Any
  8. 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
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. abstract def make(v: String): TYPE
    Attributes
    protected
    Definition Classes
    _Trait
  11. abstract def real: String
    Attributes
    protected
    Definition Classes
    _Trait
  12. 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
  13. 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
  14. 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
  15. 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
  16. def toString(): String
    Definition Classes
    Any

Operator

  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
Linear Supertypes
Any.Datum[TYPE, String], Any.Wrap[String], Any
Source: _transform.scala