OBSOLETE
FAKE0001 use Fake.Core.String instead
StringHelper
Contains basic functions for string manipulation.
Functions and values
Function or value | Description |
( <* ) prefix text
Signature: prefix:string -> text:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Checks whether the given text starts with the given prefix |
( >** ) pattern text
Signature: pattern:string -> text:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Determines if a text matches a given regex pattern. |
( >=> ) pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Find a regex pattern in a text and replaces it with the given replacement. |
append text builder
Signature: text:string -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text to a StringBuilder. |
appendFileNamesIfNotNull(...)
Signature: fileNames:seq<string> -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends all notnull fileNames. |
appendIfFalse(p)
Signature: p:bool -> string -> StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the predicate is false. |
appendIfNotNull value s
Signature: value:Object -> s:string -> StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the value is not null. |
appendIfNotNullOrEmpty value s
Signature: value:string -> s:string -> StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the value is not null or empty. |
appendIfSome o f builder
Signature: o:'a option -> f:('a -> string) -> builder:StringBuilder -> StringBuilder
Type parameters: 'a Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends string of function value if option has some value |
appendIfTrue p s builder
Signature: p:bool -> s:string -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the predicate is true. |
appendIfTrueWithoutQuotes p s builder
Signature: p:bool -> s:string -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead |
appendQuotedIfNotNull value s builder
Signature: value:Object -> s:string -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a quoted text if the value is not null. |
appendStringIfValueIsNotNull(value)
Signature: value:'?13487 -> string -> StringBuilder -> StringBuilder
Type parameters: '?13487 Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the value is not null. |
appendStringIfValueIsNotNullOrEmpty(...)
Signature: value:string -> string -> StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text if the value is not null or empty. |
AppendToFile file lines
Signature: file:string -> lines:seq<string> -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.append` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.append` instead Appends all lines to a file line by line |
appendWithoutQuotes text builder
Signature: text:string -> builder:StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text to a StringBuilder without surrounding quotes. |
appendWithoutQuotesIfNotNull value s
Signature: value:Object -> s:string -> StringBuilder -> StringBuilder
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Appends a text without quoting if the value is not null. |
charsAndDigits
Signature: char list
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Returns all standard chars and digits. |
Colon
Signature: char
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead |
ConvertFileToWindowsLineBreaks(fileName)
Signature: fileName:string -> unit
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead 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
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Converts all line breaks in a text to windows line breaks |
DecodeBase64Utf8String(text)
Signature: text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Decodes a Base64-encoded UTF-8-encoded string |
EncapsulateApostrophe(text)
Signature: text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Encapsulates the Apostrophe |
endsWith suffix text
Signature: suffix:string -> text:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Checks whether the given text ends with the given suffix |
endsWithSlash
Signature: string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Determines whether the last character of the given |
forEach items action text builder
Signature: items:'b list -> action:('b -> 'c -> StringBuilder -> 'd) -> text:'c -> builder:StringBuilder -> StringBuilder
Type parameters: 'b, 'c, 'd Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Applies action on builder for each element of list. |
isLetterOrDigit(c)
Signature: c:char -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Checks whether the given char is a standard char or digit. |
isNotNullOrEmpty(value)
Signature: value:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Returns if the string is not null or empty |
isNullOrEmpty(value)
Signature: value:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Returns if the string is null or empty |
isNullOrWhiteSpace(value)
Signature: value:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Returns if the string is null or empty or completely whitespace |
isUmlaut(c)
Signature: c:char -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Checks whether the given char is a german umlaut. |
liftString(x)
Signature: x:string -> string option
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Lifts a string to an option |
LinuxLineBreaks
Signature: string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Represents Linux line breaks |
MacLineBreaks
Signature: string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Represents Mac line breaks |
NormalizeVersion(version)
Signature: version:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Removes all trailing .0 from a version string |
ProduceRelativePath(...)
Signature: baseLocation:string -> targetLocation:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Produces relative path when possible to go from baseLocation to targetLocation. |
ReadFile(file)
Signature: file:string -> seq<string>
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.read`/`File.readWithEncoding` instead (encoding parameter added, default to UTF8)")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.read`/`File.readWithEncoding` instead (encoding parameter added, default to UTF8) Reads a file line by line |
ReadFileAsBytes(file)
Signature: file:string -> byte []
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.readAsBytes` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.readAsBytes` instead Reads a file as one array of bytes |
ReadFileAsString(file)
Signature: file:string -> string
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.readAsString`/`File.readAsStringWithEncoding` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.readAsString`/`File.readAsStringWithEncoding` instead Reads a file as one text |
ReadLine(file)
Signature: file:string -> string
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.readLine`/`File.readLineWithEncoding` instead (encoding parameter added, default to UTF8)")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.readLine`/`File.readLineWithEncoding` instead (encoding parameter added, default to UTF8) Reads the first line of a file. This can be helpful to read a password from file. |
RemoveLineBreaks(text)
Signature: text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Removes linebreaks from the given string |
replace pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Replaces the given pattern in the given text with the replacement |
ReplaceFile fileName text
Signature: fileName:string -> text:string -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.replaceContent` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.replaceContent` instead Replaces the file with the given string |
replaceFirst pattern replacement text
Signature: pattern:string -> replacement:string -> text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Replaces the first occurrence of the pattern with the given replacement. |
ReplaceInFile replaceF fileName
Signature: replaceF:(string -> string) -> fileName:string -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.applyReplace` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.applyReplace` instead Replaces the text in the given file |
separated delimiter items
Signature: delimiter:string -> items:seq<string> -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Converts a sequence of strings to a string with delimiters |
shortenCurrentDirectory(value)
Signature: value:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Replaces any occurence of the currentDirectory with . |
split delimiter text
Signature: delimiter:char -> text:string -> string list
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Splits the given string at the given char delimiter |
splitRemove delimiter text
Signature: delimiter:char -> text:string -> string list
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead |
splitStr delimiterStr text
Signature: delimiterStr:string -> text:string -> string list
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Splits the given string at the given string delimiter |
startsWith prefix text
Signature: prefix:string -> text:string -> bool
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Checks whether the given text starts with the given prefix |
toLines(text)
Signature: text:seq<string> -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Converts a sequence of strings into a string separated with line ends |
toLower(s)
Signature: s:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Converts all characters in a string to lower case. |
toRelativePath(value)
Signature: value:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Replaces the absolute path to a relative path. |
toText(builder)
Signature: builder:StringBuilder -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Returns the text from the StringBuilder |
trim(x)
Signature: x:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims the given string |
trimChars chars x
Signature: chars:char [] -> x:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims the given string |
trimEndChars chars x
Signature: chars:char [] -> x:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims the end of the given string |
trimSeparator(s)
Signature: s:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims the given string with the DirectorySeparatorChar |
trimSlash(s)
Signature: s:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Removes the slashes from the end of the given string |
trimSpecialChars(text)
Signature: text:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims all special characters from a string. |
trimStartChars chars x
Signature: chars:char [] -> x:string -> string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Trims the start of the given string |
WindowsLineBreaks
Signature: string
Attributes: [<Obsolete("FAKE0001 use Fake.Core.String instead")>] |
OBSOLETEFAKE0001 use Fake.Core.String instead Represents Windows line breaks |
WriteBytesToFile file bytes
Signature: file:string -> bytes:byte [] -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.writeBytes` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.writeBytes` instead Writes a byte array to a file |
WriteFile file lines
Signature: file:string -> lines:seq<string> -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.writeNew` instead")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.writeNew` instead Writes a file line by line |
WriteStringToFile append fileName text
Signature: append:bool -> fileName:string -> text:string -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.writeString`/`File.writeStringWithEncoding` instead (encoding parameter added, default to UTF8)")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.writeString`/`File.writeStringWithEncoding` instead (encoding parameter added, default to UTF8) Writes a string to a file |
WriteToFile append fileName lines
Signature: append:bool -> fileName:string -> lines:seq<string> -> unit
Attributes: [<Obsolete("FAKE0001 use `open Fake.IO` and `File.write`/`File.writeWithEncoding` instead (encoding parameter added, default to UTF8)")>] |
OBSOLETEFAKE0001 use `open Fake.IO` and `File.write`/`File.writeWithEncoding` instead (encoding parameter added, default to UTF8) Writes a file line by line |