js camel case to snake case
var s1 = 'someTextHere';
var o1 = s1.split(/(?=[A-Z])/).join('_').toLowerCase();
js camel case to snake case
var s1 = 'someTextHere';
var o1 = s1.split(/(?=[A-Z])/).join('_').toLowerCase();
camelCase and snakeCase
using System.Text.RegularExpressions;
public class Program
{
public static string ToSnakeCase(string str)
{
return Regex.Replace(str, "[A-Z]", "_$0").ToLower();
}
public static string ToCamelCase(string str)
{
return Regex.Replace(str, "_[a-z]", delegate(Match m) {
return m.ToString().TrimStart('_').ToUpper();
});
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us