UtilHtmlCreateUrlSlug Method
Transforms the source text to create a URL slug, using the specified
UrlSlugOptions object.
Namespace: DevCase.Core.DataProcessing.HtmlAssembly: 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
)
Public Shared Function CreateUrlSlug (
text As String,
options As UrlSlugOptions
) As String
Dim text As String
Dim options As UrlSlugOptions
Dim returnValue As String
returnValue = UtilHtml.CreateUrlSlug(text,
options)
public:
static String^ CreateUrlSlug(
String^ text,
UrlSlugOptions^ options
)
static member CreateUrlSlug :
text : string *
options : UrlSlugOptions -> string
No code example is currently available or this language may not be supported.
- text String
-
The text to transform.
- options UrlSlugOptions
-
A UrlSlugOptions object that defines various aspects of the text transformation.
String
The resulting URL slug.
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.
This is a code example.
No code example is currently available or this language may not be supported.
Dim input As String = "Mastering the Art of Creating SEO-Friendly URL Slugs: Best Practices and Tips"
Dim options As New UrlSlugOptions()
options.MaximumLength = Integer.MaxValue
options.Separator = "-"c
options.ToLower = True
Dim urlSlug As String = Slug.CreateUrlSlug(input, options)
Console.WriteLine(urlSlug)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.