1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

fix a small bug with new line truncation missing

This commit is contained in:
RaidMax
2020-02-12 15:11:43 -06:00
parent 2ff38c4f5b
commit 89bee14216
3 changed files with 10 additions and 3 deletions

View File

@ -831,6 +831,13 @@ namespace SharedLibraryCore
return Regex.IsMatch(message, @"^\u0014(?:[A-Z]|_)+$");
}
/// <summary>
/// trims new line and whitespace from string
/// </summary>
/// <param name="str">source string</param>
/// <returns></returns>
public static string TrimNewLine(this string str) => str.Trim().TrimEnd('\r', '\n');
public static Vector3 FixIW4Angles(this Vector3 vector)
{
float X = vector.X >= 0 ? vector.X : 360.0f + vector.X;