VfsProviderUtils β
Namespace: MJCZone.MediaMatic.Providers
Assembly: MJCZone.MediaMatic
Summary β
Utility class for virtual file system providers.
static public
Contents β
Methods (5)
Methods β
GenerateSlug β
Converts an arbitrary string into a URL-safe slug. - Lowercases using invariant culture - Removes diacritics (Γ‘ -> a, ΓΌ -> u, etc.) - Replaces whitespace and common separators with '-' - Collapses multiple '-' and trims from both ends - Keeps only letters, digits, and allowed special characters - If maxLength is specified and exceeded, trims and appends "...{removedCount}" (while keeping total length <= maxLength).
string GenerateSlug(
string input,
string allowedSpecialCharacters,
Int32} maxLength)Parameters β
input (string) - Input string.
allowedSpecialCharacters (string) - Extra non-alphanumeric characters to allow in the slug. Defaults to the RFC 3986 unreserved specials: "-._~". Letters and digits are always allowed.
maxLength (Int32}) - Optional maximum length for the resulting slug. If the slug is longer, it is truncated and suffixed with "...{removedCount}".
Returns β
Type: string
URL-safe slug string.
GetType β
GetType()ToString β
ToString()Equals β
Equals()GetHashCode β
GetHashCode()