String

Contains basic functions for string manipulation.

Nested types and modules

TypeDescription
String
ModuleDescription
Operators

Functions and values

Function or valueDescription
charsAndDigits
Signature: char list

Returns all standard chars and digits.

Colon
Signature: char
ConvertFileToWindowsLineBreak (...)
Signature: encoding:Encoding -> fileName:string -> unit
ConvertFileToWindowsLineBreaksWithEncoding (...)
Signature: encoding:Encoding -> fileName:string -> unit

Reads a file line by line and replaces all line breaks to windows line breaks - uses a temp file to store the contents in order to prevent OutOfMemory exceptions

ConvertTextToWindowsLineBreaks text
Signature: text:string -> string

Converts all line breaks in a text to windows line breaks

DecodeBase64Utf8String text
Signature: text:string -> string

Decodes a Base64-encoded UTF-8-encoded string

EncapsulateApostrophe text
Signature: text:string -> string

Encapsulates the Apostrophe

endsWith suffix text
Signature: suffix:string -> text:string -> bool

Checks whether the given text ends with the given suffix

endsWithSlash
Signature: string -> bool

Determines whether the last character of the given matches Path.DirectorySeparatorChar.

isLetterOrDigit c
Signature: c:char -> bool

Checks whether the given char is a standard char or digit.

isNotNullOrEmpty value
Signature: value:string -> bool

Returns if the string is not null or empty

isNullOrEmpty value
Signature: value:string -> bool

Returns if the string is null or empty

isNullOrWhiteSpace value
Signature: value:string -> bool

Returns if the string is null or empty or completely whitespace

isUmlaut c
Signature: c:char -> bool

Checks whether the given char is a german umlaut.

liftString x
Signature: x:string -> string option

Lifts a string to an option

LinuxLineBreaks
Signature: string

Represents Linux line breaks

MacLineBreaks
Signature: string

Represents Mac line breaks

NormalizeVersion version
Signature: version:string -> string

Removes all trailing .0 from a version string

RemoveLineBreaks text
Signature: text:string -> string

Removes linebreaks from the given string

replace pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string

Replaces the given pattern in the given text with the replacement

replaceFirst pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string

Replaces the first occurrence of the pattern with the given replacement.

separated delimiter items
Signature: delimiter:string -> items:seq<string> -> string

Converts a sequence of strings to a string with delimiters

split delimiter text
Signature: delimiter:char -> text:string -> string list

Splits the given string at the given char delimiter

splitStr delimiterStr text
Signature: delimiterStr:string -> text:string -> string list

Splits the given string at the given string delimiter

startsWith prefix text
Signature: prefix:string -> text:string -> bool

Checks whether the given text starts with the given prefix

toLines text
Signature: text:seq<string> -> string

Converts a sequence of strings into a string separated with line ends

toLower s
Signature: s:string -> string

Converts all characters in a string to lower case.

trim x
Signature: x:string -> string

Trims the given string

trimChars chars x
Signature: chars:char [] -> x:string -> string

Trims the given string

trimEndChars chars x
Signature: chars:char [] -> x:string -> string

Trims the end of the given string

trimSeparator s
Signature: s:string -> string

Trims the given string with the DirectorySeparatorChar

trimSlash s
Signature: s:string -> string

Removes the slashes from the end of the given string

trimSpecialChars text
Signature: text:string -> string

Trims all special characters from a string.

trimStartChars chars x
Signature: chars:char [] -> x:string -> string

Trims the start of the given string

WindowsLineBreaks
Signature: string

Represents Windows line breaks