Table of Contents

Method RemovePrefixes

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

RemovePrefixes(string?, IEnumerable<string>, StringComparison)

Removes the specified prefixes from the beginning of the input string, if present.

public static string? RemovePrefixes(string? input, IEnumerable<string> prefixes, StringComparison comparison = StringComparison.CurrentCulture)

Parameters

input string

The input string to process.

prefixes IEnumerable<string>

The prefixes to remove from input.

comparison StringComparison

The string comparison mode used for prefix matching.

Returns

string

The input string without the prefixes if any matched; otherwise, the original input. Returns null if input is null.