Erste Zeilen des Parser-Codes
This commit is contained in:
19
src/StringUtils.cs
Normal file
19
src/StringUtils.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace WorldOfPeacecraft
|
||||
{
|
||||
public class StringUtils
|
||||
{
|
||||
public static string SubstringBefore(string str, string separator)
|
||||
{
|
||||
if (str == null)
|
||||
return null;
|
||||
return str.Substring(0, str.IndexOf(separator));
|
||||
}
|
||||
|
||||
public static string SubstringAfter(string str, string separator)
|
||||
{
|
||||
if (str == null)
|
||||
return null;
|
||||
return str.Substring(str.IndexOf(separator) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user