Browse Source

Fixed StringFormatter compile error in platform builds #84

master
chrisgregan 10 years ago
parent
commit
d6be0a1a9d
  1. 8
      Assets/Fungus/FungusScript/Scripts/StringFormatter.cs

8
Assets/Fungus/FungusScript/Scripts/StringFormatter.cs

@ -1,5 +1,4 @@
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
using System.Text;
@ -19,20 +18,27 @@ namespace Fungus
}
return enumLabels;
}
public static string SplitCamelCase(string text)
{
if (string.IsNullOrEmpty(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();
}
public static bool IsNullOrWhiteSpace(string value)
{
if (value != null)

Loading…
Cancel
Save