grizzled.string.Implicits.String

GrizzledString

implicit class GrizzledString extends AnyRef

An analog to Scala's RichString class, providing some methods that neither RichString nor String provide. By importing the implicit conversion functions, you can use the methods in this class transparently from a String or RichString object.

import grizzled.string.Implicits.String._

val s = "a  b          c"
println(s.tokenize) // prints: List(a, b, c)
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. GrizzledString
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GrizzledString(string: String)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

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

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  7. def chomp: String

    Like perl's chomp(): Remove any newline at the end of the line.

    Like perl's chomp(): Remove any newline at the end of the line.

    returns

    the possibly modified line

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def escapeNonPrintables: String

    Escape any non-printable characters by converting them to metacharacter sequences.

    Escape any non-printable characters by converting them to metacharacter sequences.

    returns

    the possibly translated string

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def ltrim: String

    Trim white space from the front (left) of a string.

    Trim white space from the front (left) of a string.

    returns

    possibly modified string

  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def rtrim: String

    Trim white space from the back (right) of a string.

    Trim white space from the back (right) of a string.

    returns

    possibly modified string

  21. val string: String

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    AnyRef → Any
  24. def toTokens: List[StringToken]

    Tokenize the string on white space, returning Token objects.

    Tokenize the string on white space, returning Token objects. This method is useful when you need to keep track of the locations of the tokens within the original string.

    returns

    A list of tokens, or Nil if there aren't any.

  25. def toTokens(delims: String): List[StringToken]

    Tokenize the string on a set of delimiter characters, returning Token objects.

    Tokenize the string on a set of delimiter characters, returning Token objects. This method is useful when you need to keep track of the locations of the tokens within the original string.

    delims

    the delimiter characters

    returns

    A list of tokens, or Nil if there aren't any.

  26. def tokenize(delims: String): List[String]

    Tokenize the string on a set of delimiter characters.

    Tokenize the string on a set of delimiter characters.

    delims

    the delimiter characters

    returns

    A list of tokens, or Nil if there aren't any.

  27. def tokenize: List[String]

    Tokenize the string on white space.

    Tokenize the string on white space. An empty string and a string with only white space are treated the same. Note that doing a split("""\s+""").toList on an empty string ("") yields a list of one item, an empty string. Doing the same operation on a blank string (" ", for example) yields an empty list. This method differs from split("""\s+""").toList, in that both cases are treated the same, returning a Nil.

    returns

    A list of tokens, or Nil if there aren't any.

  28. def translateMetachars: String

    Translate any metacharacters (e.

    Translate any metacharacters (e.g,. \t, \n, \\u2122) into their real characters, and return the translated string. Metacharacter sequences that cannot be parsed (because they're unrecognized, because the Unicode number isn't four digits, etc.) are passed along unchanged.

    returns

    the possibly translated string

  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped