final class DrxString extends AnyVal
- Source
- string.scala
- Alphabetic
- By Inheritance
- DrxString
- AnyVal
- Any
- by richDrxAny
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DrxString(string: String)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- def +(other: String): String
- def +++(xs: Iterable[String]): String
- def +++(opt: Option[String]): String
alias for flatConcat is needed so left to right operator precidence works when named opperators are higher than operators
- def ->[B](y: B): (DrxString, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def ansi(c: Color): String
- def applyIf(t: Boolean, f: (DrxString) => DrxString): DrxString
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def applyIf(t: (DrxString) => Boolean)(f: (DrxString) => DrxString): DrxString
better chaining for types
better chaining for types
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def base(charset: IndexedSeq[Char]): Long
- def base(radix: Int): Long
- def camelCase: String
- def containsSound(str: String)(implicit p: Phonetic): Boolean
- def containsSubsequence(x: String): Boolean
- def decapitalize: String
- def doesNotContain(x: String): Boolean
- def doesNotEndWith(x: String): Boolean
- def doesNotStartWith(x: String): Boolean
- def dos2unix: String
- def dropRightWhile(p: (Char) => Boolean): String
- def elementOf(xs: Set[DrxString]): Boolean
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def ensuring(cond: (DrxString) => Boolean, msg: => Any): DrxString
- def ensuring(cond: (DrxString) => Boolean): DrxString
- def ensuring(cond: Boolean, msg: => Any): DrxString
- def ensuring(cond: Boolean): DrxString
- def escapeXML: String
- def fit(n: Int, align: AlignHorizontal = Left, padChar: String = " "): String
- def flatConcat(xs: Option[String]): String
- def flatConcat(xs: Iterable[String]): String
fix "bug" of intent for string concat with a +++ for flatConcat or ++ for a concat of seq of chars
- def formatted(fmtstr: String): String
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def href(path: String): String
- def indent(margin: String): String
- def indent: String
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lcp(that: String): String
- def levenshtein(that: String): Int
- def longestCommonSuffix(that: String): String
- def noneIf(f: (DrxString) => Boolean): Option[DrxString]
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def opposite(implicit p: Opposite[String, String]): Option[String]
- def optionIf(f: (DrxString) => Boolean): Option[DrxString]
optionally wrap an object
optionally wrap an object
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def overlay(that: String): String
- def pluck[A](p: Pluck[String, A]): Option[A]
easy way to grab all matches of a string, an alternative name would be pluckAllFirstMatchGroup
- def pluckAll[A](p: Pluck[String, A]): Iterator[A]
- def preApply[B](f: (DrxString) => B): B
a preApply f => f(a)
a preApply f => f(a)
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def println(): Unit
- def quote: String
- def removeVowels: String
- def replaceAllWith(regex: drx.Regex)(replacer: (String) => String): String
- def replaceAllWith(regex: drx.Regex, replacement: String = ""): String
- def replaceIf(cond: (String) => Boolean, replacement: => String): String
- def sideEffect(f: (DrxString) => Unit): DrxString
side effect filter
side effect filter
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def singularize(str: String): String
- def someIf(f: (DrxString) => Boolean): Option[DrxString]
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def soundsLike(str: String)(implicit p: Phonetic): Boolean
- def splitTerms: Array[String]
- val string: String
- def strip(strings: Iterable[String]): String
- def strip(regex: drx.Regex): String
- def tag(tag: String, attrs: (String, String)*): String
- def tag(c: Color): String
- def takeRightWhile(p: (Char) => Boolean): String
- val thisAny: DrxString
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def toByteBuffer: ByteBuffer
assuming utf8 now that this is nearly standard
- def toBytes: Array[Byte]
assuming utf8 now that this is nearly standard
- def toOption: Option[String]
- def toString(): String
- Definition Classes
- Any
- def truncate(len: Int = 70, postfix: String = "..."): String
- def unQuote: String
- def unWrap(pre: String, post: String): String
- def undent: String
- def undent(margin: String): String
- def underscore: String
replace spaces with underscores
- def unpad: String
a better
trim
, the java.lang.String strips out to much (including ansicodes) - def unpadHead: String
- def wordMap[B](f: (String) => B): Map[String, B]
- def words: IndexedSeq[String]
- def wrap(pre: String, post: String): String
- def wrap(pre: String): String
Deprecated Value Members
- def ?>(f: (DrxString) => Boolean): Option[DrxString]
alias for option if
alias for option if
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) to many symbols are hard to undertand
- def findAllMatches(regex: drx.Regex): Iterator[Match]
an left to right version of regex findAllMatchIn string
an left to right version of regex findAllMatchIn string
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.13) use the Pluck typeclass instead which better encodes the Regex -> Match -> Extrator -> Type pattern in a typesafe inference way
- def pluck(regex: drx.Regex): Option[String]
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.13) use pluck(Pluck(regex)) istead
- def pluckAll(regex: drx.Regex): Iterator[String]
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.13) use pluckAll(Pluck(regex)) istead
- def stripAnsi: String
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) use Ansi.strip
- def |>[B](f: (DrxString) => B): B
- Implicit
- This member is added by an implicit conversion from DrxString toDrxAny[DrxString] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) use
preApply
if you must (symbols are concise without concision)
- def →[B](y: B): (DrxString, B)
- Implicit
- This member is added by an implicit conversion from DrxString toArrowAssoc[DrxString] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.