add spaces between words unity
public string AddSpacesToSentence(string text)
{
if (string.IsNullOrWhiteSpace(text))
return "";
StringBuilder newText = new StringBuilder(text.Length * 2);
newText.Append(text[0]);
for (int i = 1; i < text.Length; i++)
{
if (char.IsUpper(text[i]) && text[i - 1] != ' ')
newText.Append(' ');
newText.Append(text[i]);
}
return newText.ToString();
}
Also in C#:
- convert word files to plain text c#
- how to detected WindowCloseEvent in other window wpf
- unity simple fps controller
- vector between two points unity
- datatable return column names
- C# Into To Tring Debug.Log
- c# build string out of list of strings
- c# multiple catch exceptions
- unity get child
- c# loop through array
- c# changimg to one decimal place
- make string
- unity html get request
- define a vector c#
- how to convert iformfile to byte array c#
- unity set material color
- degree to radians c#
- rotate to face direction
- how to locate a specific element in a list c#
- c# get index of item in list
- unity3d invector expand fsm controller
- mongodb custom IIdGenerator
- sum the digits in c#
- write last line txt file c#