Namespaces

Types in Fake

Type StringHelper

Namespace Fake

Methods

Properties

Public static methods

StringBuilder append(string s, StringBuilder builder)

Appends a text

StringBuilder appendFileNamesIfNotNull(IEnumerable<string> fileNames, StringBuilder builder)

Appends all notnull fileNames

FSharpFunc<string, FSharpFunc<StringBuilder, StringBuilder>> appendIfFalse(bool p)

Appends a text if the predicate is false

FSharpFunc<StringBuilder, StringBuilder> appendIfNotNull<a>(a value, string s)

Appends a text if the value is not null

StringBuilder appendIfTrue(bool p, string s, StringBuilder builder)

Appends a text if the predicate is true

FSharpFunc<string, FSharpFunc<StringBuilder, StringBuilder>> appendStringIfValueIsNotNull<a>(a value)

Appends a text if the value is not null

FSharpFunc<string, FSharpFunc<StringBuilder, StringBuilder>> appendStringIfValueIsNotNullOrEmpty(string value)

Appends a text if the value is not null or empty

void AppendToFile(string file, IEnumerable<string> lines)

Appends all lines to a file line by line

void ConvertFileToWindowsLineBreaks(string fileName)

string ConvertTextToWindowsLineBreaks(string text)

string EncapsulateApostrophe(string text)

Encapsulates the Apostrophe

bool endsWith(string suffix, string text)

Checks wether the given text ends with the given suffix

Regex getRegEx(string pattern)

bool isLetterOrDigit(Char c)

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

bool isNullOrEmpty(string arg00)

Returns if the string is null or empty

bool isUmlaut(Char c)

Checks wether the given char is a german umlaut.

string NormalizeVersion(string version)

Removes all trailing.0 from a version string

string ProduceRelativePath(string baseLocation, string targetLocation)

Produces relative path when possible to go from baseLocation to targetLocation.
Parameters
string baseLocation

The root folder

string targetLocation

The target folder

Return
string

The relative path relative to baseLocation

string productName()

IEnumerable<string> ReadFile(string file)

Reads a file line by line

string ReadFileAsString(string file)

Reads a file as one text

string regex_replace(string pattern, string replacement, string text)

string RemoveLineBreaks(string text)

Removes linebreaks from the given string

string replace(string pattern, string replacement, string text)

Replaces the given pattern in the given text with the replacement

void ReplaceFile(string fileName, string text)

Replaces the file with the given string

string replaceFirst(string pattern, string replacement, string text)

void ReplaceInFile(FSharpFunc<string, string> replaceF, string fileName)

string separated(string delimiter, IEnumerable<string> items)

Converts a sequence of strings to a string with delimiters

string shortenCurrentDirectory(string value)

Replaces any occurence of the currentDirectory with.

FSharpList<string> split(Char delimiter, string text)

Splits the given string at the given delimiter

bool startsWith(string prefix, string text)

Checks wether the given text starts with the given prefix

string toLines(IEnumerable<string> s)

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

string toRelativePath(string value)

Replaces the absolute path to a relative

string trimSeparator(string s)

Trims the given string with the DirectorySeparatorChar

string trimSlash(string s)

Removes the slashes from the end of the given string

string trimSpecialChars(string s)

void WriteFile(string file, IEnumerable<string> lines)

Writes a file line by line

void WriteStringToFile(bool append, string file, string text)

Writes string to a file

void WriteToFile(bool append, string fileName, IEnumerable<string> lines)

Writes a file line by line

Public properties

FSharpList<Char> charsAndDigits get;

Returns all standard chars and digits.

Char Colon get;

string directorySeparator get;

The directory separator string. On most systems / or \

FSharpFunc<string, bool> endsWithSlash get;

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

FSharpFunc<string, bool> isNotNullOrEmpty get;

Returns if the string is not null or empty

string LinuxLineBreaks get;

string MacLineBreaks get;

Dictionary<string, string> relativePaths get;

A cache of relative path names.

string WindowsLineBreaks get;