Revert "File scoped namespaces"

This reverts commit d31d8f574e.
This commit is contained in:
Burak Kaan Köse
2025-02-16 11:43:30 +01:00
parent d31d8f574e
commit cf9869b71e
617 changed files with 32097 additions and 31478 deletions

View File

@@ -1,21 +1,22 @@
using System;
namespace Wino.Core.Extensions;
public static class StringExtensions
namespace Wino.Core.Extensions
{
public static bool Contains(this string source, string toCheck, StringComparison comp)
public static class StringExtensions
{
return source?.IndexOf(toCheck, comp) >= 0;
}
public static string ReplaceFirst(this string text, string search, string replace)
{
int pos = text.IndexOf(search);
if (pos < 0)
public static bool Contains(this string source, string toCheck, StringComparison comp)
{
return text;
return source?.IndexOf(toCheck, comp) >= 0;
}
public static string ReplaceFirst(this string text, string search, string replace)
{
int pos = text.IndexOf(search);
if (pos < 0)
{
return text;
}
return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
}
return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
}
}