first sentence letter capital in c#
C#
public static class StringExtension
{
public static string CapitalizeFirst(this string s)
{
bool IsNewSentense = true;
var result = new StringBuilder(s.Length);
for (int i = 0; i < s.Length; i++)
{
if (IsNewSentense && char.IsLetter(s[i]))
{
result.Append (char.ToUpper (s[i]));
IsNewSentense = false;
}
else
result.Append (s[i]);
if (s[i] == '!' || s[i] == '?' || s[i] == '.')
{
IsNewSentense = true;
}
}
return result.ToString();
}
}
Also in C#:
- Title
- float to int c#
- Category
- C#
- Title
- downlaod file and use C#
- Category
- C#
- Title
- math class C# exponents
- Category
- C#
- Title
- datatable return column names
- Category
- C#
- Title
- how to do a messagebox in c#
- Category
- C#
- Title
- asign only common fields in c# object
- Category
- C#
- Title
- get random point within radius
- Category
- C#
- Title
- C# Unknown column 'FundAllocation' in 'field list
- Category
- C#
- Title
- how to stop a form c#
- Category
- C#
- Title
- how to say or in c#
- Category
- C#
- Title
- c# list append
- Category
- C#
- Title
- unity clamp rotation
- Category
- C#
- Title
- how to add system.messaging c#
- Category
- C#
- Title
- C# save pdf stream to file
- Category
- C#
- Title
- c# round number down
- Category
- C#
- Title
- C# .net core convert int to enum
- Category
- C#
- Title
- C# public 2d array
- Category
- C#
- Title
- change partial view based on select asp.net core
- Category
- C#
- Title
- c# reverse a string
- Category
- C#
- Title
- countdown script unity
- Category
- C#
- Title
- modificare una strinfa in c#
- Category
- C#
- Title
- .net core session
- Category
- C#
- Title
- how to pass object as test case in nunit c#
- Category
- C#
- Title
- Assets\playermove.cs(30,37): error CS1003: Syntax error, ',' expected
- Category
- C#
- Title
- c# relaxed boolean cast
- Category
- C#
- Title
- initialize enum with another enum c#
- Category
- C#
- Title
- c# list string return concatenate
- Category
- C#
- Title
- debug.log
- Category
- C#
- Title
- make a list c#
- Category
- C#
- Title
- c# print
- Category
- C#
- Title
- Unity3d GPS code
- Category
- C#
- Title
- c# download file
- Category
- C#
- Title
- c# keyvaluepair
- Category
- C#
- Title
- how to make an array in csharp
- Category
- C#
- Title
- c# print expression tree
- Category
- C#
- Title
- check distance to gameobject
- Category
- C#
- Title
- traversing an enum c#
- Category
- C#
- Title
- file picker uwp c#
- Category
- C#
- Title
- how to change player cursor c# script unity
- Category
- C#
- Title
- convert base64 string to string c#
- Category
- C#
- Title
- how to add movement in unity
- Category
- C#
- Title
- unity hide mouse first person
- Category
- C#
- Title
- c# retrieve files in folder
- Category
- C#
- Title
- c# string to memorystream
- Category
- C#
- Title
- how to create a variable in C#
- Category
- C#
- Title
- asp.netcore: develop on win10 run on ubuntu
- Category
- C#
- Title
- internal c#
- Category
- C#
- Title
- how to raycast unit
- Category
- C#
- Title
- transform object according to its parent unity
- Category
- C#
- Title
- Read csv file into wpf C#
- Category
- C#
- Title
- .net identity seed users and roles
- Category
- C#
- Title
- c# send email
- Category
- C#
- Title
- unity deactivate scripts in list
- Category
- C#
- Title
- unity normalize vector2
- Category
- C#
- Title
- never lose focus textbox c#
- Category
- C#
- Title
- what is using static in c#
- Category
- C#
- Title
- winforms c# add data to datagridview with a button
- Category
- C#
- Title
- cannot convert string to generic type c#
- Category
- C#
- Title
- fahrenheit to celsius c#
- Category
- C#
- Title
- convert array object to int[] c#
- Category
- C#
- Title
- how to clear console in c#
- Category
- C#
- Title
- check connection c#
- Category
- C#
- Title
- how to put double quotes in a string c#
- Category
- C#
- Title
- unity instantiate
- Category
- C#
- Title
- unity get data from firebase
- Category
- C#
- Title
- c# type of generic is string
- Category
- C#
- Title
- c# how to check if two lists have same values
- Category
- C#
- Title
- c# if statement
- Category
- C#
- Title
- player script unity
- Category
- C#
- Title
- object escape player unity
- Category
- C#
- Title
- c list add element
- Category
- C#
- Title
- pop up element from specific index in array
- Category
- C#
- Title
- No context type was found in the assembly
- Category
- C#
- Title
- nullreferenceexception c#
- Category
- C#
- Title
- how to hide a panel ui unity
- Category
- C#
- Title
- unity making homing missile
- Category
- C#
- Title
- convert comma separated string to array c#
- Category
- C#
- Title
- c# inheritance constructor
- Category
- C#
- Title
- c# check if string is in array
- Category
- C#
- Title
- c# zip a file
- Category
- C#
- Title
- and unity
- Category
- C#
- Title
- convert array to list Unity C#
- Category
- C#
- Title
- populate combobox from array c#
- Category
- C#
- Title
- c# make string null
- Category
- C#
- Title
- c# empty char
- Category
- C#
- Title
- make camera follow character unity 2020
- Category
- C#
- Title
- c# to vb.net
- Category
- C#
- Title
- how to make a float in C++
- Category
- C#
- Title
- declare string array c# without size
- Category
- C#
- Title
- c# region tag
- Category
- C#
- Title
- c# webrequest cookies
- Category
- C#
- Title
- visual c#
- Category
- C#
- Title
- non null array length
- Category
- C#
- Title
- c# remove last value from list
- Category
- C#
- Title
- Unity how to put IEnumerator in update and loop once with yeild return new waitforseconds
- Category
- C#
- Title
- cshtml foreach
- Category
- C#
- Title
- page parent wpf
- Category
- C#
- Title
- using serial port in c#
- Category
- C#
- Title
- while loop c#
- Category
- C#
- Title
- Move player on planets in unity 2d
- Category
- C#