SunamoUri¶
For working with URL (Uniform Resource Locator / Identifier)
- NuGet: $(@{Name=SunamoUri; CsprojRel=SunamoUri/SunamoUri/SunamoUri.csproj; ReadmePath=/home/runner/work/PlatformIndependentNuGetPackages/PlatformIndependentNuGetPackages/SunamoUri/README.md; Description=For working with URL (Uniform Resource Locator / Identifier); ApiNamespace=SunamoUri}.Name)
- Source: GitHub
- API reference: ../../api/SunamoUri.html
A .NET library for working with URLs (Uniform Resource Locators / Identifiers). Provides comprehensive URI manipulation, encoding/decoding, query string parsing, and URL sanitization utilities.
Overview¶
SunamoUri is part of the Sunamo package ecosystem, providing modular, platform-independent utilities for .NET development.
Main Components¶
QSHelper¶
Query string helper class for parsing and manipulating URL query strings.
GetParameter()- Get a parameter value from a URI (returns null if not found)GetParameterSE()- Get a parameter value from a URI (returns empty string if not found)GetQS()- Build a query string URL from parametersGetNormalizeQS()- Normalize a query string by sorting parametersParseQs()- Parse a query string into a dictionaryRemoveQs()- Remove the query string from a URI
UH (URI Helper)¶
Main URI helper class with methods for URL manipulation.
RemovePrefixHttpOrHttps()- Remove HTTP/HTTPS protocol prefixAppendHttpIfNotExists()/AppendHttpsIfNotExists()- Ensure protocol prefixGetHost()- Extract host name from a URIGetFileName()- Extract file name from a URIGetDirectoryName()- Extract directory path from a URIGetUriSafeString()- Convert text to a URI-safe slugUrlEncode()/UrlDecode()- URL encoding/decodingCombine()- Combine URI segmentsIsValidUriAndDomainIs()- Validate URI and check domainKeepOnlyHostAndProtocol()- Extract host and protocol onlySanitizeKeepOnlyHost()- Sanitize URI to host name only
Installation¶
Target Frameworks¶
- .NET 10.0
- .NET 9.0
- .NET 8.0
Dependencies¶
- CaseDotNet (v0.3.36) - Case conversion utilities
- Diacritics (v4.1.4) - Diacritics removal
- Microsoft.Extensions.Logging.Abstractions (v10.0.2) - Logging abstractions
Package Information¶
- Authors: www.sunamo.cz
- License: MIT
- Repository: GitHub
Related Packages¶
This package is part of the Sunamo package ecosystem. For more information about related packages, visit the main repository.