Allow #ENDSHORT tags
Detect where Preview and ShortEnd came from Introduce a function to check whether a given GameMode is available for a song
This commit is contained in:
1 parent
87ba525811
commit
b12e4156fa
14 files changed
+167
-97
No files matched your search
@@ -73,5 +73,29 @@ namespace VocaluxeLib
|
||||
{
|
||||
return value.IndexOf(other, StringComparison.CurrentCultureIgnoreCase) >= 0;
|
||||
}
|
||||
|
||||
public static string TrimMultipleWs(this string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return "";
|
||||
int start = 0;
|
||||
int len = value.Length;
|
||||
while (value[start] == ' ')
|
||||
{
|
||||
start++;
|
||||
if (start >= len)
|
||||
return "";
|
||||
}
|
||||
if (start > 0)
|
||||
start--;
|
||||
int end = --len;
|
||||
while (value[end] == ' ')
|
||||
end--;
|
||||
if (end < len)
|
||||
end++;
|
||||
if (end - start < len)
|
||||
value = value.Substring(start, end - start + 1);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user