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

 

Removes a string prefix from a string and returns the remainder of the string. If the string does not start with the prefix, 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^ TrimPrefix(
	String^ s,
	String^ prefix,
	StringComparison stringComparision = StringComparison::OrdinalIgnoreCase
)

Parameters

s
Type: System::String^

The string to be stripped of a prefix.

prefix
Type: System::String^

The prefix to be stripped.

stringComparision
Type: System::StringComparison

Optional StringComparison specification. Defaults to case-insensitive.

Return Value

Type: System::String^

The string without its prefix.

Return to top
Show: