StringOps

final
class StringOps(self: String) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.

Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.

def charsNel(e: => NonEmptyList[Char]): NonEmptyList[Char]

Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.

Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.

def parseBigDecimal: Validation[String, BigDecimal]
def parseBigInt: Validation[String, BigInteger]
def parseBoolean: Validation[String, Boolean]
def parseByte: Validation[String, Byte]
def parseDouble: Validation[String, Double]
def parseFloat: Validation[String, Float]
def parseInt: Validation[String, Int]
def parseLong: Validation[String, Long]
def parseShort: Validation[String, Short]
def plural(n: Long): String

Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.

Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.