Erste Zeilen des Parser-Codes

This commit is contained in:
2014-04-04 01:03:46 +02:00
parent b222183a0a
commit caf4438908
3 changed files with 50 additions and 3 deletions

19
src/StringUtils.cs Normal file
View 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);
}
}
}