StringFunctions

class Object
trait Matchable
class Any
object Scalaz
object string

Value members

Concrete methods

def charsNel(s: String): Option[NonEmptyList[Char]]

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(s: String, 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 parseBoolean(s: String): Validation[IllegalArgumentException, Boolean]
def parseByte(s: String): Validation[NumberFormatException, Byte]
def parseDouble(s: String): Validation[NumberFormatException, Double]
def parseFloat(s: String): Validation[NumberFormatException, Float]
def parseInt(s: String): Validation[NumberFormatException, Int]
def parseLong(s: String): Validation[NumberFormatException, Long]
def parseShort(s: String): Validation[NumberFormatException, Short]
def plural(s: String, 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.

Deprecated methods

@deprecated("Unsafe. Use `charsNel` instead", "7.2")
def charsNelErr(s: String, message: => String): NonEmptyList[Char]
Deprecated
@deprecated("Unsafe. Use `charsNel` instead", "7.2")
def unsafeCharsNel(s: String): NonEmptyList[Char]
Deprecated