Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CsuChhs.Extensions/CsuChhs.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>CHHS Application Development Team</Authors>
<Version>1.5.2</Version>
<Version>1.5.3</Version>
<PackageProjectUrl>https://github.com/csu-chhs/CsuChhs.Extensions</PackageProjectUrl>
<Company>College of Health and Human Sciences</Company>
<PackageId>CsuChhs.Extensions</PackageId>
Expand Down
11 changes: 11 additions & 0 deletions CsuChhs.Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ public static string ToTwelveHourTime(this string value)
return $"{newTime.Value}:{value.Substring(2)} {amPm2}";
}

/// <summary>
/// Convert string into a URL encoded string. Safe to
/// put in URLS
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public static string ToUrlEncodedString(this string value)
{
return Uri.EscapeDataString(value);
}

/// <summary>
/// Converts a possible URL without scheme into
/// one with an acceptable scheme.
Expand Down
Loading