Skip to main content

SiteUtils

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class SiteUtils

Methods

UrlFromSlug(String)

Allow slugs to capture URLs, Examples: techstacks.io => https://techstacks.io http:techstacks.io => http://techstacks.io techstacks.io:1000 => https://techstacks.io:1000 techstacks.io:1000:site1:site2 => https://techstacks.io:1000/site1/site2 techstacks.io:site1%7Csite2 => https://techstacks.io/site1|site2 techstacks.io:1000:site1:site2(a:1,b:"c,d",e:f) => https://techstacks.io:1000/site1/site2(a:1,b:"c,d",e:f)

View Source
Declaration
public static string UrlFromSlug(string slug)
Returns

System.String

Parameters
TypeName
System.Stringslug

UrlToSlug(String)

Convert URL to URL-friendly slugs, Examples: https://techstacks.io => techstacks.io http://techstacks.io => http:techstacks.io https://techstacks.io:1000 => techstacks.io:1000 https://techstacks.io:1000/site1/site2 => techstacks.io:1000:site1:site2 https://techstacks.io/site1|site2 => techstacks.io:site|site2 https://techstacks.io:1000/site1/site2(a:1,b:"c,d",e:f) => techstacks.io:1000:site1:site2(a:1,b:"c,d",e:f)

View Source
Declaration
public static string UrlToSlug(string url)
Returns

System.String

Parameters
TypeName
System.Stringurl

ToUrlEncoded(List<String>)

View Source
Declaration
public static string ToUrlEncoded(List<string> args)
Returns

System.String

Parameters
TypeName
System.Collections.Generic.List<System.String>args