UtilHtmlCreateUrlSlug Method

Transforms the source text to create a URL slug, using the specified UrlSlugOptions object.

Definition

Namespace: DevCase.Core.DataProcessing.Html
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string CreateUrlSlug(
	string text,
	UrlSlugOptions options
)

Parameters

text  String
The text to transform.
options  UrlSlugOptions
A UrlSlugOptions object that defines various aspects of the text transformation.

Return Value

String
The resulting URL slug.

Remarks

A URL slug, also known as a "clean URL" or "search engine friendly URL", is a text string that represents a specific webpage or resource on a website. It is typically used to create human-readable and descriptive URLs that are easy to understand and remember.

URL slugs are usually derived from the title or main content of the webpage and are formatted to be URL-safe by removing special characters, spaces, and converting them to lowercase. The resulting string is then appended to the base domain to form the complete URL.

URL slugs play a role in search engine optimization (SEO) as they help search engines and users alike understand the content of a webpage just by looking at the URL.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also