FSharpx.Extras


Strings Module

Functions and values

Function or value Description

s @? i

Full Usage: s @? i

Parameters:
    s : string
    i : int

Returns: char option
s : string
i : int
Returns: char option

contains substr t

Full Usage: contains substr t

Parameters:
    substr : string
    t : string

Returns: bool
Modifiers: inline

Returns a value indicating whether the specified substring occurs within this string

substr : string
t : string
Returns: bool

inferType values

Full Usage: inferType values

Parameters:
    values : string seq

Returns: Type

Checks whether all values of the sequence can be inferred to a special type

values : string seq
Returns: Type

isBool s

Full Usage: isBool s

Parameters:
    s : string

Returns: bool

Checks whether the string is a boolean value

s : string
Returns: bool

isFloat s

Full Usage: isFloat s

Parameters:
    s : string

Returns: bool

Checks whether the string is a float

s : string
Returns: bool

isInt s

Full Usage: isInt s

Parameters:
    s : string

Returns: bool

Checks whether the string is an int32

s : string
Returns: bool

isInt64 s

Full Usage: isInt64 s

Parameters:
    s : string

Returns: bool

Checks whether the string is an int64

s : string
Returns: bool

isNewline c

Full Usage: isNewline c

Parameters:
    c : char

Returns: bool
c : char
Returns: bool

isNullOrEmpty text

Full Usage: isNullOrEmpty text

Parameters:
    text : string

Returns: bool
Modifiers: inline

Returns if the string is null or empty

text : string
Returns: bool

joinLines input

Full Usage: joinLines input

Parameters:
    input : string list

Returns: string

Creates newline seperated string from the string list

input : string list
Returns: string

joinWords input

Full Usage: joinWords input

Parameters:
    input : string list

Returns: string

Folds the string list by seperating entries with a single space

input : string list
Returns: string

niceName s

Full Usage: niceName s

Parameters:
    s : string

Returns: string

Turns a string into a nice PascalCase identifier

s : string
Returns: string

pluralize noun

Full Usage: pluralize noun

Parameters:
    noun : string

Returns: string

Returns the pluralized version of a noun

noun : string
Returns: string

replace pattern replacement text

Full Usage: replace pattern replacement text

Parameters:
    pattern : string
    replacement : string
    text : string

Returns: string
Modifiers: inline

Replaces the given "replacement" for every occurence of the pattern in the given text

pattern : string
replacement : string
text : string
Returns: string

satisfies predicate charOption

Full Usage: satisfies predicate charOption

Parameters:
    predicate : char -> bool
    charOption : char option

Returns: char option
Modifiers: inline
predicate : char -> bool
charOption : char option
Returns: char option

singularize noun

Full Usage: singularize noun

Parameters:
    noun : string

Returns: string

Returns the singularized version of a noun

noun : string
Returns: string

split delimiter text

Full Usage: split delimiter text

Parameters:
    delimiter : char
    text : string

Returns: string[]
Modifiers: inline

Splits the given string at the given delimiter

delimiter : char
text : string
Returns: string[]

splitBy isDelimiter str

Full Usage: splitBy isDelimiter str

Parameters:
    isDelimiter : char -> bool
    str : string

Returns: string seq

Returns a sequence of strings split by the predicate

isDelimiter : char -> bool
str : string
Returns: string seq

startsWith prefix text

Full Usage: startsWith prefix text

Parameters:
    prefix : string
    text : string

Returns: bool
Modifiers: inline

Checks whether the given text starts with the given prefix

prefix : string
text : string
Returns: bool

toCharArray str

Full Usage: toCharArray str

Parameters:
    str : string

Returns: char[]
Modifiers: inline
str : string
Returns: char[]

toLines input

Full Usage: toLines input

Parameters:
    input : string

Returns: string seq

Splits a string based on newlines

input : string
Returns: string seq

toWords input

Full Usage: toWords input

Parameters:
    input : string

Returns: string seq

Splits a string based on whitespace (spaces, tabs, and newlines)

input : string
Returns: string seq

Active patterns

Active pattern Description

(|EOF|_|) _arg1

Full Usage: (|EOF|_|) _arg1

Parameters:
    _arg1 : 'a option

Returns: unit option
_arg1 : 'a option
Returns: unit option

(|LetterDigit|_|)

Full Usage: (|LetterDigit|_|)

Returns: char option -> char option
Returns: char option -> char option

(|Lower|_|)

Full Usage: (|Lower|_|)

Returns: char option -> char option
Returns: char option -> char option

(|Upper|_|)

Full Usage: (|Upper|_|)

Returns: char option -> char option
Returns: char option -> char option