=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
+5
View File
@@ -3,6 +3,7 @@
/// <summary>
/// Provides static extension methods for the <see cref="string"/> type.
/// </summary>
/// <!-- aidoc:v1 sig=cc11c0a -->
public static class StringEx
{
/// <summary>
@@ -10,6 +11,7 @@ public static class StringEx
/// </summary>
/// <param name="source">The string to evaluate.</param>
/// <returns><c>true</c> if <paramref name="source"/> is <c>null</c> or an empty string; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=6fb921b body=7fbbf9d -->
public static bool IsEmpty(this string source)
{
return string.IsNullOrEmpty(source);
@@ -20,6 +22,7 @@ public static class StringEx
/// </summary>
/// <param name="source">The string to evaluate.</param>
/// <returns>true if the string is null, empty, or contains only white space; otherwise, false.</returns>
/// <!-- aidoc:v1 sig=cec22b6 body=67e9275 -->
public static bool IsEmptyOrWhiteSpace(this string source)
{
return string.IsNullOrWhiteSpace(source);
@@ -31,6 +34,7 @@ public static class StringEx
/// <param name="source">The string to search within.</param>
/// <param name="value">The delimiter whose first occurrence marks the start of the returned substring.</param>
/// <returns>The substring after the first occurrence of <paramref name="value"/>; otherwise, the original <paramref name="source"/>.</returns>
/// <!-- aidoc:v1 sig=e1718c5 body=92784ed -->
public static string SubstringAfter(this string source, string value)
{
if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(value)) return source;
@@ -48,6 +52,7 @@ public static class StringEx
/// <param name="source">The string to extract the substring from.</param>
/// <param name="value">The delimiter whose first occurrence marks the end of the returned substring.</param>
/// <returns>The substring of <paramref name="source"/> before the first occurrence of <paramref name="value"/>, or the original <paramref name="source"/> when no match is found or when either input is null or empty.</returns>
/// <!-- aidoc:v1 sig=a2fe204 body=2083b5c -->
public static string SubstringBefore(this string source, string value)
{
if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(value)) return source;