NameTransformExtensionsApply Method

Applies the specified transformation to a name.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public static string Apply(
	this NameTransform transform,
	string name,
	string? suffixToStrip = null
)

Parameters

transform  NameTransform
The transformation to apply.
name  String
The name to transform.
suffixToStrip  String  (Optional)
An optional suffix to remove from the string before transformation. Only used if transform is not NameTransformNone.

Return Value

String
The transformed name.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type NameTransform. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

See Also