Table of Contents

TopicTransformationExtensions.NormalizeWhiteSpace Method

Definition

Namespace
Sandcastle.Core.PresentationStyle.Transformation
Assembly
Sandcastle.Core.dll

Normalize whitespace in a string by replacing consecutive runs of whitespace with a single space and removing leading and trailing whitespace.

public static string NormalizeWhiteSpace(this string text)

Parameters

text string

The text to normalize

Returns

string

The normalized string

Remarks

This is based on the normalize-space() XSLT function implementation in the .NET Framework