PackageUtilities::TrimSuffix Method (String^, String^, StringComparison)

 

Removes a string suffix from a string and returns the remainder of the string. If the string does not end with the suffix, returns the original string unchanged.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
[ExtensionAttribute]
static String^ TrimSuffix(
	String^ s,
	String^ suffix,
	StringComparison stringComparision = StringComparison::OrdinalIgnoreCase
)

Parameters

s
Type: System::String^

The string to be stripped of a suffix.

suffix
Type: System::String^

The suffix to be stripped.

stringComparision
Type: System::StringComparison

Optional StringComparison specification. Defaults to case-insensitive.

Return Value

Type: System::String^

The string without its suffix.

Return to top
Show: