This is part of the Fake.Core.String module.

String

Contains basic functions for string manipulation.

Nested types and modules

TypeDescription
String
ModuleDescription
Operators

Functions and values

Function or valueDescription
String.charsAndDigits
Signature: char list

Returns all standard chars and digits.

String.Colon
Signature: char
String.convertFileToWindowsLineBreak(...)
Signature: encoding:Encoding -> fileName:string -> unit
String.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

String.convertTextToWindowsLineBreaks(...)
Signature: text:string -> string

Converts all line breaks in a text to windows line breaks

String.decodeBase64Utf8String(text)
Signature: text:string -> string

Decodes a Base64-encoded UTF-8-encoded string

String.encapsulateApostrophe(text)
Signature: text:string -> string
Modifiers: inline

Encapsulates the Apostrophe

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

Checks whether the given text ends with the given suffix

String.endsWithSlash
Signature: string -> bool

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

String.isLetterOrDigit(c)
Signature: c:char -> bool

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

String.isNotNullOrEmpty(value)
Signature: value:string -> bool
Modifiers: inline

Returns if the string is not null or empty

String.isNullOrEmpty(value)
Signature: value:string -> bool
Modifiers: inline

Returns if the string is null or empty

String.isNullOrWhiteSpace(value)
Signature: value:string -> bool
Modifiers: inline

Returns if the string is null or empty or completely whitespace

String.isUmlaut(c)
Signature: c:char -> bool

Checks whether the given char is a german umlaut.

String.liftString(x)
Signature: x:string -> string option

Lifts a string to an option

String.LinuxLineBreaks
Signature: string

Represents Linux line breaks

String.MacLineBreaks
Signature: string

Represents Mac line breaks

String.NormalizeVersion(version)
Signature: version:string -> string

Removes all trailing .0 from a version string

String.removeLineBreaks(text)
Signature: text:string -> string
Modifiers: inline

Removes linebreaks from the given string

String.replace pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string
Modifiers: inline

Replaces the given pattern in the given text with the replacement

String.replaceFirst(...)
Signature: pattern:string -> replacement:string -> text:string -> string

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

String.separated delimiter items
Signature: delimiter:string -> items:seq<string> -> string
Modifiers: inline

Converts a sequence of strings to a string with delimiters

String.split delimiter text
Signature: delimiter:char -> text:string -> string list
Modifiers: inline

Splits the given string at the given char delimiter

String.splitStr delimiterStr text
Signature: delimiterStr:string -> text:string -> string list
Modifiers: inline

Splits the given string at the given string delimiter

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

Checks whether the given text starts with the given prefix

String.toLines(text)
Signature: text:seq<string> -> string
Modifiers: inline

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

String.toLower(s)
Signature: s:string -> string
Modifiers: inline

Converts all characters in a string to lower case.

String.trim(x)
Signature: x:string -> string
Modifiers: inline

Trims the given string

String.trimChars chars x
Signature: chars:char [] -> x:string -> string
Modifiers: inline

Trims the given string

String.trimEndChars chars x
Signature: chars:char [] -> x:string -> string
Modifiers: inline

Trims the end of the given string

String.trimSeparator(s)
Signature: s:string -> string
Modifiers: inline

Trims the given string with the DirectorySeparatorChar

String.trimSlash(s)
Signature: s:string -> string
Modifiers: inline

Removes the slashes from the end of the given string

String.trimSpecialChars(text)
Signature: text:string -> string
Modifiers: inline

Trims all special characters from a string.

String.trimStartChars chars x
Signature: chars:char [] -> x:string -> string
Modifiers: inline

Trims the start of the given string

String.WindowsLineBreaks
Signature: string

Represents Windows line breaks