Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/FSharpPlus/Extensions/String.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,23 @@ module String =
/// Converts to lowercase -- nullsafe function wrapper for String.ToLowerInvariant method.
let toLower (source: string) = if isNull source then source else source.ToLowerInvariant ()

/// Trims white space -- function wrapper for String.Trim method.
/// Trims leading and trailing white spaces -- function wrapper for String.Trim method.
///
/// Note this is distinct from trim which trims the given characters,
/// not whitespace.
/// not white spaces.
let trimWhiteSpaces (source: string) = source.Trim ()

/// Trims leading white spaces -- function wrapper for String.TrimStart method.
///
/// Note this is distinct from trim which trims the given characters,
/// not white spaces.
let trimStartWhiteSpaces (source: string) = source.TrimStart ()

/// Trims trailing white spaces -- function wrapper for String.TrimEnd method.
///
/// Note this is distinct from trim which trims the given characters,
/// not white spaces.
let trimEndWhiteSpaces (source: string) = source.TrimEnd ()

#if !FABLE_COMPILER

Expand Down