StringExtensions.TrimInside Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

TrimInside(String, Boolean)

Removes all duplicate white-space (replacing it with single space) from the string. Also removes all leading and trailing whitespace.

public static string TrimInside(this string text, bool br = false)

Parameters

text
System.String
br
System.Boolean

Returns

System.String

A string with duplicate white-space replaced with a single space or null if the text contained only whitespace.