Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

string to camel case c#

// This converts to camel case
    // Location_ID => locationId, and testLEFTSide => testLeftSide

    static string CamelCase(string s)
    {
        var x = s.Replace("_", "");
        if (x.Length == 0) return "null";
        x = Regex.Replace(x, "([A-Z])([A-Z]+)($|[A-Z])",
            m => m.Groups[1].Value + m.Groups[2].Value.ToLower() + m.Groups[3].Value);
        return char.ToLower(x[0]) + x.Substring(1);
    }
Comment

string to camel case c#

static string PascalCase(string s)
    {
        var x = CamelCase(s);
        return char.ToUpper(x[0]) + x.Substring(1);
    }
Comment

string to camel case c#

Char.ToLowerInvariant(name[0]) + name.Substring(1)
Comment

PREVIOUS NEXT
Code Example
Csharp :: dictionary order by value c# 
Csharp :: joins List of strings 
Csharp :: unit test c# exception thrown 
Csharp :: get current time c# 
Csharp :: length of array c# unity 
Csharp :: scene switch unity 
Csharp :: C# default value for datetime parameter 
Csharp :: remove all array elements c# 
Csharp :: c# ienumerable to list 
Csharp :: c# not 
Csharp :: c# remove first three characters from string 
Csharp :: c# for statement 
Csharp :: qtablewidget add image 
Csharp :: toggle unity c# 
Csharp :: unity setparent 
Csharp :: convert list string to list long c# 
Csharp :: copy class c# 
Csharp :: asp.net 5 iis HTTP Error 500.19 - Internal Server Error 
Csharp :: textblock line break 
Csharp :: limiting the amount of decimal places c# 
Csharp :: vb.net add row to datagridview programmatically 
Csharp :: how to find current country c# 
Csharp :: blazor ref to component in if 
Csharp :: c# loops 
Csharp :: How to type custom backcolor on c# winform 
Csharp :: c# wpf timer 
Csharp :: switch case with 2 variables c# 
Csharp :: Plugging a Third-Party IoC Container (e.g. AutoFac) into .NET Core 6 
Csharp :: wpf how to focus on element 
Csharp :: c# Program to check if a given year is leap year 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =