Logo GenPRES

String Module

Holds string functions for testing for empty text, replacing, splitting, trimming and removing trailing zeros from a Dutch number.

Functions and values

Function or value Description

apply f s

Full Usage: apply f s

Parameters:
    f : string -> 'a
    s : string

Returns: 'a
Type parameters: 'a

Applies f to the string s.

f : string -> 'a
s : string
Returns: 'a

contains s1 s2

Full Usage: contains s1 s2

Parameters:
    s1 : string
    s2 : string

Returns: bool

True when the string s2 contains the string s1.

s1 : string
s2 : string
Returns: bool

get

Full Usage: get

Returns: string -> string

Returns the string unchanged. Callers use it to fix the type of a value to string for inference.

Returns: string -> string

isNullOrEmpty s

Full Usage: isNullOrEmpty s

Parameters:
Returns: bool

True when the string is null or has no characters. A string of only white space is not empty.

s : String
Returns: bool

isNullOrWhiteSpace s

Full Usage: isNullOrWhiteSpace s

Parameters:
Returns: bool

True when the string is null, empty or only white space.

s : String
Returns: bool

length s

Full Usage: length s

Parameters:
    s : string

Returns: int

Get the length of s

s : string
Returns: int

notEmpty

Full Usage: notEmpty

Returns: String -> bool

True when the string has a character other than white space. False for a null string.

Returns: String -> bool

removeTrailing chars s

Full Usage: removeTrailing chars s

Parameters:
    chars : string seq
    s : String

Returns: string

Removes from the end of the string every character that is in chars.

chars : string seq
s : String
Returns: string

removeTrailingZerosFromDutchNumber s

Full Usage: removeTrailingZerosFromDutchNumber s

Parameters:
    s : string

Returns: string

Removes the trailing zeros after the decimal comma of a Dutch number. Removes the comma too when no decimals remain.

s : string
Returns: string

replace s1 s2 s

Full Usage: replace s1 s2 s

Parameters:
    s1 : string
    s2 : string
    s : string

Returns: string
s1 : string
s2 : string
s : string
Returns: string

split del s

Full Usage: split del s

Parameters:
    del : string
    s : string

Returns: string[]
del : string
s : string
Returns: string[]

trim s

Full Usage: trim s

Parameters:
    s : string

Returns: string
s : string
Returns: string

Type something to start searching.