Skip to content

ShareSlug

Namespace Nfty.Core.Publish.Community in assembly Nfty.Core.

public static class ShareSlug

Turns a collection name into the slug that names a share's Release, files and index entry.

Methods

IsValid(string)

public static bool IsValid(string slug);

Whether a string is a slug: 1 to 40 of lowercase letters, digits and inner dashes.

Parameters

  • slug (string) - The candidate.

Returns. True when valid.

Of(string)

public static string Of(string collectionName);

The slug for a name: lowercase letters and digits, runs of anything else as one dash, at most 40 characters.

Parameters

  • collectionName (string) - The collection's published name.

Returns. A valid slug; a name with no ASCII letters or digits gets set- plus eight hex digits of its hash, stable for that name.