Click or drag to resize

StringHelperAppendWithSpaceIfNotEmpty Method (String, String)

Appends toAdd (with a separating space) to contents, if toAdd is not empty.

Namespace:  Bootstrap.A11y.Helpers
Assembly:  Bootstrap.A11y (in Bootstrap.A11y.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
C#
public static string AppendWithSpaceIfNotEmpty(
	string contents,
	string toAdd
)

Parameters

contents
Type: SystemString
The base text to be returned no matter what.
toAdd
Type: SystemString
The additional string to append if not empty.

Return Value

Type: String
If toAdd has contents, a space and toAdd are appended to contents. Otherwise (toAdd is null or empty), contents is returned unchanged.
See Also