Creado apartir del commit b888de6c92056de294456f581a56e25e734d4ab7 de develop

This commit is contained in:
jrojas
2026-06-26 09:52:35 +02:00
commit 319fd3dfb0
746 changed files with 106610 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
namespace adas_core.Domain.Utils;
public static class StringEx
{
public static bool IsEmpty(this string source)
{
return string.IsNullOrEmpty(source);
}
public static bool IsEmptyOrWhiteSpace(this string source)
{
return string.IsNullOrWhiteSpace(source);
}
public static string SubstringAfter(this string source, string value)
{
if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(value)) return source;
var index = source.IndexOf(value, StringComparison.Ordinal);
return index >= 0
? source.Substring(index + value.Length)
: source;
}
public static string SubstringBefore(this string source, string value)
{
if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(value)) return source;
var index = source.IndexOf(value, StringComparison.Ordinal);
return index >= 0
? source.Substring(0, index)
: source;
}
}