StringHelperEnsureClassPresent Method
|
Ensures that classes contains toAdd.
Namespace:
Bootstrap.A11y.Helpers
Assembly:
Bootstrap.A11y (in Bootstrap.A11y.dll) Version: 1.1.0.0 (1.1.0.0)
Syntaxpublic static string EnsureClassPresent(
string classes,
string toAdd
)
Parameters
- classes
- Type: SystemString
The existing list of CSS classes. - toAdd
- Type: SystemString
The CSS class to add.
Return Value
Type:
String
If
classes contains
toAdd,
classes is returned as-is.
Otherwise,
classes and
toAdd are concatenated with a space in between and returned.
See Also