Browse Source

Added an utility method to uppercase the first letter of strings.

pull/1/head
triton 12 years ago
parent
commit
42d3d0cc97
  1. 11
      src/Generator/Utils/Utils.cs

11
src/Generator/Utils/Utils.cs

@ -175,6 +175,17 @@ namespace Cxxi
yield return result; yield return result;
} }
} }
public static string UppercaseFirst(string s)
{
// Check for empty string.
if (string.IsNullOrEmpty(s))
{
return string.Empty;
}
// Return char and concat substring.
return char.ToUpper(s[0]) + s.Substring(1);
}
} }
public static class AssemblyHelpers public static class AssemblyHelpers

Loading…
Cancel
Save