String.Custom.Data

abstract class Data[A <: String](typeName: String) extends String.Custom.Type[A] with Ref.Custom.Framework[A]
trait String.Z.Lib[A]
trait _transform[A]
trait _copy[A]
trait _modify[A]
trait _evaluate[A]
class Ref.Custom.Type[A, String]
class Opaque.Type[A]
trait Info.Tag.Doc[A]
trait Info.Tag.Void[A]
class Info.Tag.Type[A]
class Object
trait Matchable
class Any

Alias

Inherited

type Buffer = Ref.Buffer[A]
Inherited from
Framework
Source
__.scala
Inherited from
Framework
Source
__.scala
Inherited from
Framework
Source
__.scala
type Idx = Idx[A]
Inherited from
Framework
Source
__.scala
final val Idx: Ref.Idx[A]
Inherited from
Framework
Source
__.scala
type Lookup[B] = Lookup[A, B]
Inherited from
Framework
Source
__.scala
final val Lookup: Ref.Lookup[A]
Inherited from
Framework
Source
__.scala
type Opt = Opt.type[A]
Inherited from
Framework
Source
__.scala
final val Opt: Ref.Opt[A]
Inherited from
Framework
Source
__.scala
type Pro = Pro[A]
Inherited from
Framework
Source
__.scala
final val Pro: Ref.Pro[A]
Inherited from
Framework
Source
__.scala
type Promise = Promise[A]
Inherited from
Framework
Source
__.scala
final val Promise: Ref.Promise[A]
Inherited from
Framework
Source
__.scala
type Result = Result.type[A]
Inherited from
Framework
Source
__.scala
final val Result: Ref.Result[A]
Inherited from
Framework
Source
__.scala
Inherited from
Framework
Source
__.scala

Def

Inherited inherited

@targetName("_join")
inline def +(inline v: A | String): A
Inherited from
_modify
Source
_modify.scala
@targetName("_joinAll")
inline def ++(inline v: ~[A | String]): A
Inherited from
_modify
Source
_modify.scala
@targetName("char_Stream")
def char_~: ~

Source of Chars

Source of Chars

Returns String as a Source of [Char]] "abcd".char_~ tp // Prints ~(a, x, c, d)

Inherited from
_transform
Source
_transform.scala
inline def charAt(i: Int): Char

Char at position

Char at position

Returns Char at the specified position

Inherited from
_evaluate
Source
_evaluate.scala
@targetName("charAt_Opt")
def charAt_?(i: Int): Opt

Char at position

Char at position

Optionally Returns Char at the specified position

/ is returned if specified position is out of String range

if(<name>.charAt_?(2).take(_.isUpper)) ()
// is equivalent
if(<name>.length >=2 && <name>.charAt(2).isUpper) ()
Inherited from
_evaluate
Source
_evaluate.scala
@targetName("charIndex_Opt")
def charIndex_?(f: Char => Boolean, from: Opt): Opt

Char index

Char index

Optionally returns index of the first Char passing the let function

   "abcd_abcd_".charIndex_?(_ >= 'd', 4) tp // Prints: ?(8)
   "abcd_abcd_".charIndex_?('x' <> 'z') tp  // Prints: \/
Value Params
from

position to start looking from

Inherited from
_evaluate
Source
_evaluate.scala
inline def compareTo(v: A): Int
Inherited from
_evaluate
Source
_evaluate.scala
inline def contains(v: A | String): Boolean

Contains check

Contains check

Returns true is this String contains that String "abc".contains("cd") tp // Prints: false

Inherited from
_evaluate
Source
_evaluate.scala
inline def drop_<>(i: <>): A
Inherited from
_copy
Source
_copy.scala
inline def drop_<>(s: Int, sz: Int): A
Inherited from
_copy
Source
_copy.scala
inline def dropFirst(inline cnt: Int): A
Inherited from
_copy
Source
_copy.scala
inline def dropLast(inline cnt: Int): A
Inherited from
_copy
Source
_copy.scala
inline def endsWith(v: A | String): Boolean

Check if ends with

Check if ends with

Returns true this String ends with that String "abc".endsWith("bc") tp // Prints: true

Inherited from
_evaluate
Source
_evaluate.scala
inline def equalsIgnoreCase(v: A | 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").tp // Prints: true

Inherited from
_evaluate
Source
_evaluate.scala
inline def indent(tag: A | String): A

Indents text with the lines

Indents text with the lines

Indents text with the tag.

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

```
   "abc

de xyz".indent("Idxs: ").tp // Output Idxs: abc de xyz ```

Inherited from
_transform
Source
_transform.scala
@targetName("indexesOf_Stream")
def indexesOf_~(v: A | String, from: Opt): ~[Int]

Source of indexes

Source of indexes

Source of indexes for each occurrence of x "abcd_abcd_abcd_abcd_abcd".indexesOf_~("bc") tp // Prints ~(1, 6, 11, 16, 21)

Value Params
from

position to start looking from

Inherited from
_evaluate
Source
_evaluate.scala
@targetName("indexOf_Opt")
def indexOf_?(v: A | String, from: Opt): Opt

Value position

Value position

Optionally returns position of the specified x "abcd_abcd_".indexOf_?("d_a") tp // Prints: ?(3)

Value Params
from

position to start looking from

Inherited from
_evaluate
Source
_evaluate.scala
def info(v: A): Info

Type to Info

Type to Info

Override this method to provide type standard Info implementation

Inherited from
Type
Source
Type.scala
def insertAt(i: Int, v: A | String): A

Insert at position

Insert at position

Creates new String with x inserted at the specified position "0123456789".insertAt(5,"abc") tp // Prints: 01234abc56789

Inherited from
_modify
Source
_modify.scala
final def isRef: Boolean
Inherited from
Type
Source
Type.scala
override def isVoid(v: A): Boolean
Definition Classes
Type -> Type -> Void
Inherited from
Type
Source
Custom.scala
def join(v: A | String): A
Inherited from
_modify
Source
_modify.scala
def joinAll(v: ~[A | String]): A
Inherited from
_modify
Source
_modify.scala
def label: A

Capitalize

Capitalize

Capitalizes first character of every word (separated by white spaces) "all string ops".tag tp // Prints: All String Ops

Inherited from
_modify
Source
_modify.scala
@targetName("lastCharIndex_Opt")
def lastCharIndex_?(f: Char => Boolean, from: Opt): Opt

Char index

Char index

Optionally returns index of the last Char passing the let function

   "abcd_abcd_".lastCharIndex_?(_ >= 'd', 4) tp // Prints: ?(3)
   "abcd_abcd_".lastCharIndex_?('x' <> 'z') tp  // Prints: \/
Value Params
from

last position to start looking from end to start

Inherited from
_evaluate
Source
_evaluate.scala
@targetName("lastIndexOf_Opt")
def lastIndexOf_?(v: A | String, from: Opt): Opt

Value position

Value position

Optionally returns last position of the specified x "abcd_abcd_abcd_".lastIndexOf_?("d_a") tp // Prints: ?(8)

Value Params
from

last position to start looking from end to start

Inherited from
_evaluate
Source
_evaluate.scala
inline def length: Int
Inherited from
_evaluate
Source
_evaluate.scala
@targetName("line_Stream")
def line_~: ~[A]

Source of lines

Source of lines

Creates a [[Source]] of Strings representing lines (delimited by '

') of this text

```  "abc

def xyz".line_~.tp // Prints ~(abc, def, xyz) ```

Inherited from
_transform
Source
_transform.scala
inline def lower: A

toLowerCase

toLowerCase

Creates new String with all upper case Chars changed to lower case "ABc".lower tp // Prints: abc

Inherited from
_modify
Source
_modify.scala
val name: String
Inherited from
Type
Source
Type.scala
@targetName("nonEmpty_Opt")
def nonEmpty_?: Opt[A]
Inherited from
_transform
Source
_transform.scala
final lazy val ordering: Ordering[A]
Inherited from
Type
Source
Custom.scala
def padEndTo(sz: Int, pad: String): A

Pad end

Pad end

Pads end of string to targetLength

Value Params
pad

string to pad with. "ABC".padEndTo(10,"_") tp // Prints: ABC_______

Inherited from
_modify
Source
_modify.scala
def padStartTo(sz: Int, pad: String): A

Pad start

Pad start

Pads start of string to targetLength

Value Params
pad

string to pad with. "ABC".padStartTo(10,"_") tp // Prints: _______ABC

Inherited from
_modify
Source
_modify.scala
inline def real: String
Inherited from
Type
Source
Type.scala
inline def remove(v: A | String): A

Remove all

Remove all

Creates new String with all occurrences of x removed "123123123123".remove("2") tp // Prints: 13131313

Inherited from
_modify
Source
_modify.scala
inline def replace(v: A | String, target: A | String): A

Replace all

Replace all

Creates new String with all occurrences of x replaced with target "123123123123".replace("2","_") tp // Prints: 1_31_31_31_3

Inherited from
_modify
Source
_modify.scala
def replace(r: <>, v: A | String): A

Replace range with x

Replace range with x

Creates new String with all occurrences of x replaced with target "0123456789".replace(3 <> 7 ,"_") tp // Prints: 012_89

Inherited from
_modify
Source
_modify.scala
def replaceFirst(v: A | String, v2: A | String, cnt: Int): A
Inherited from
_modify
Source
_modify.scala
def replaceLast(v: A | String, v2: A | String, cnt: Int): A
Inherited from
_modify
Source
_modify.scala
@targetName("split_Stream")
def split_~(separators: Array[Char]): ~[A]
Inherited from
_transform
Source
_transform.scala
@targetName("split_Stream")
def split_~(separator: Char): ~[A]
Inherited from
_transform
Source
_transform.scala
inline def startsWith(v: A | String): Boolean

Check if begins with

Check if begins with

Returns true this String starts with that String "abc".startsWith("ab") tp // Prints: true

Inherited from
_evaluate
Source
_evaluate.scala
override def tag(v: A): String
Definition Classes
Type -> Type -> Doc
Inherited from
Type
Source
Custom.scala
inline def take_<>(r: <>): A
Inherited from
_copy
Source
_copy.scala
inline def take_<>(s: Int, sz: Int): A
Inherited from
_copy
Source
_copy.scala
def takeAfter(v: A | String, dflt: Opt[A], from: Opt): A

Copy end

Copy end

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

If no x found, dflt x is returned, or original if dflt is void

   "abcdefg".copyAfter("cd") tp // Prints: efg
Value Params
string

position to start looking from

Inherited from
_copy
Source
_copy.scala
def takeAfterLast(v: A | String, dflt: Opt[A], from: Opt): A

Copy end

Copy end

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

If no x found, dflt x is returned, or original if dflt is void.

   "abcd_abcd_abcd".takeFromLast("ab") tp // Prints: cd
Value Params
from

string last position to start looking from end to start

Inherited from
_copy
Source
_copy.scala
def takeBefore(v: A | String, dflt: Opt[A], from: Opt): A

Copy start

Copy start

Copies String from the beginning until specified x found

If no x found, dflt x is returned, or original if dflt is void

   "abcdefg".takeBefore("ef") tp // Prints: abcd
Value Params
string

position to start looking from

Inherited from
_copy
Source
_copy.scala
def takeBeforeLast(v: A | String, dflt: Opt[A], from: Opt): A

Copy start

Copy start

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

If no x found, dflt x is returned, or original if dflt is void

   "abcd_abcd_abcd".copyBeforeLast("ab") tp // Prints: abcd_abcd_
Value Params
from

string last position to start looking from end to start

Inherited from
_copy
Source
_copy.scala
inline def takeFirst(inline cnt: Int): A
Inherited from
_copy
Source
_copy.scala
def takeFrom(v: A | String, dflt: Opt[A], from: Opt): A

Copy end

Copy end

Copies String from the position where the specified x found

If no x found, dflt x is returned, or original if dflt is void

   "abcdefg".takeFrom("cd") tp // Prints: cdefg
Value Params
string

position to start looking from

Inherited from
_copy
Source
_copy.scala
def takeFromLast(v: A | String, dflt: Opt[A], from: Opt): A

Copy end

Copy end

Copies String from the last position the specified x found

If no x found, dflt x is returned, or original if dflt is void.

   "abcd_abcd_abcd".takeFromLast("ab") tp // Prints: abcd
Value Params
from

string last position to start looking from end to start

Inherited from
_copy
Source
_copy.scala
inline def takeLast(cnt: Int): A
Inherited from
_copy
Source
_copy.scala
@targetName("toBoolean_Opt")
Inherited from
_transform
Source
_transform.scala
@targetName("toBoolean_Result")
def toBoolean_??: Result[Boolean]

Boolean result conversion

Boolean result conversion

Converts String to Boolean result

 "true".toBoolean_?? tp

 "abc".toBoolean_?? tp

 // Output
 Result(true)
 Result(failure=For input string: "abc")
Inherited from
_transform
Source
_transform.scala
@targetName("toDouble_Opt")
Inherited from
_transform
Source
_transform.scala
@targetName("toDouble_Result")
def toDouble_??: Result[Double]

Double result conversion

Double result conversion

Converts String to Double result

 "123.45".toDouble_?? tp

 "abc".toDouble_?? tp

 // Output
 Result(123.45)
 Result(failure=For input string: "abc")
Inherited from
_transform
Source
_transform.scala
@targetName("toInt_Opt")
def toInt_?: Opt
Inherited from
_transform
Source
_transform.scala
@targetName("toInt_Result")
def toInt_??: Result[Int]

Int result conversion

Int result conversion

Converts String to Int result

 "123".toInt_?? tp

 "abc".toInt_?? tp

 // Output
 Result(123)
 Result(failure=For input string: "abc")
Inherited from
_transform
Source
_transform.scala
@targetName("tokenized_Stream")
def tokenized_~(separators: ~[A]): ~[(A, <>, A)]

Source of tokens

Source of tokens

 Multi token tokenizetion

 Returns a Tuple including:

   - Separator preceding the token, empty for the first token
   - [[!.Range]] of the token in the text
   - String token

 ```
    val str: String = (1 <> 40).~.makeString()
    "Text to Tokenize:".tp.tp
    str.tp.tp
    ("Token", "Range", "String").tp
    str.replace("

", "").tokenized~(Stream("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
    --- --------- -------------------
 ```
Value Params
separators

a Source of text separators to consider

Inherited from
_transform
Source
_transform.scala
@targetName("toLong_Opt")
Inherited from
_transform
Source
_transform.scala
@targetName("toLong_Result")
def toLong_??: Result[Long]

Long result conversion

Long result conversion

Converts String to Long result

  "123".toLong_?? tp

  "abc".toLong_?? tp

  // Output
  Result(123)
  Result(failure=For input string: "abc")
Inherited from
_transform
Source
_transform.scala
inline def trim: A

Trim both ends

Trim both ends

Trims both ends of String from space Chars

Inherited from
_modify
Source
_modify.scala
def trimBoth(f: Char => Boolean): A

Trim both ends

Trim both ends

Trims both ends of String from Chars defined by let function

   "yyxxxxABCxxyyxx".trimBoth('x' <> 'z') tp                // Prints: ABC

   "yyxxxxABCxxyyxx".trimBoth(c => c == 'x' || c == 'y') tp // Prints: xxxxABCxx
Inherited from
_modify
Source
_modify.scala
def trimEnd(f: Char => Boolean): A

Trim both ends

Trim both ends

Trims end of String from Chars defined by let function

   "ABCxxyyxx".trimEnd('x' <> 'z') tp                // Prints: ABC

   "ABCxxyyxx".trimEnd(c => c == 'x' || c == 'y') tp // Prints: ABCxx
Inherited from
_modify
Source
_modify.scala
inline def trimEnd: A

Trim end

Trim end

Trims end of String from space Chars

Inherited from
_modify
Source
_modify.scala
def trimStart(f: Char => Boolean): A

Trim start

Trim start

Trims start of String from Chars defined by let function

   "yyxxxxABC".trimBoth('x' <> 'z') tp                // Prints: ABC

   "yyxxxxABC".trimBoth(c => c == 'x' || c == 'y') tp // Prints: xxxxABC
Inherited from
_modify
Source
_modify.scala
inline def trimStart: A

Trim start

Trim start

Trims start of String from space Chars

Inherited from
_modify
Source
_modify.scala
inline def upper: A

toUpperCase

toUpperCase

Creates new String with all lower case Chars changed to upper case "aBc".upper tp // Prints: ABC

Inherited from
_modify
Source
_modify.scala