V15: Update to dotnet 9 (#16625)
* Update to dotnet 9 and update nuget packages * Update umbraco code version * Update Directory.Build.props Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> * Include preview version in pipeline * update template projects * update global json with specific version * Update version.json to v15 * Rename TrimStart and TrimEnd to string specific * Rename to Exact * Update global.json Co-authored-by: Ronald Barendse <ronald@barend.se> * Remove includePreviewVersion * Rename to trim exact --------- Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
@@ -287,14 +287,14 @@ public static class StringExtensions
|
||||
/// <param name="value">The value.</param>
|
||||
/// <param name="forRemoving">For removing.</param>
|
||||
/// <returns></returns>
|
||||
public static string Trim(this string value, string forRemoving)
|
||||
public static string TrimExact(this string value, string forRemoving)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return value.TrimEnd(forRemoving).TrimStart(forRemoving);
|
||||
return value.TrimEndExact(forRemoving).TrimStartExact(forRemoving);
|
||||
}
|
||||
|
||||
public static string EncodeJsString(this string s)
|
||||
@@ -343,7 +343,7 @@ public static class StringExtensions
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string TrimEnd(this string value, string forRemoving)
|
||||
public static string TrimEndExact(this string value, string forRemoving)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
@@ -363,7 +363,7 @@ public static class StringExtensions
|
||||
return value;
|
||||
}
|
||||
|
||||
public static string TrimStart(this string value, string forRemoving)
|
||||
public static string TrimStartExact(this string value, string forRemoving)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
@@ -390,7 +390,7 @@ public static class StringExtensions
|
||||
return input;
|
||||
}
|
||||
|
||||
return toStartWith + input.TrimStart(toStartWith);
|
||||
return toStartWith + input.TrimStartExact(toStartWith);
|
||||
}
|
||||
|
||||
public static string EnsureStartsWith(this string input, char value) =>
|
||||
|
||||
Reference in New Issue
Block a user