CSharp examples for System:String Case
Camel Friendly
using Microsoft.Extensions.Localization; using System.Text.RegularExpressions; using System.Text; using System.Net; using System.Linq; using System.Globalization; using System.Collections.Generic; using System;//from w ww. j a va2 s . c o m public class Main{ public static string CamelFriendly(this string camel) { if (string.IsNullOrWhiteSpace(camel)) return ""; var sb = new StringBuilder(camel); for (int i = camel.Length - 1; i > 0; i--) { var current = sb[i]; if ('A' <= current && current <= 'Z') { sb.Insert(i, ' '); } } return sb.ToString(); } }