1234567891011121314151617181920212223242526 |
- using System;
- using System.Linq;
- namespace Unity.Cloud.Collaborate.Utilities
- {
- static class ExtensionMethods
- {
-
-
-
-
-
-
-
-
- public static string FirstCharToUpper(this string input)
- {
- switch (input)
- {
- case null: throw new ArgumentNullException(nameof(input));
- case "": throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input));
- default: return input.First().ToString().ToUpper() + input.Substring(1);
- }
- }
- }
- }
|