15 lines
374 B
C#
15 lines
374 B
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace UnityEngine.Localization
|
|
{
|
|
static class StringExtensionMethods
|
|
{
|
|
static readonly Regex s_WhitespaceRegex = new Regex(@"\s+");
|
|
|
|
public static string ReplaceWhiteSpaces(this string str, string replacement = "")
|
|
{
|
|
return s_WhitespaceRegex.Replace(str, replacement);
|
|
}
|
|
}
|
|
}
|