Sentence starting by capital letter

Hi,

I have in my datatable phrase e.g. “; my name is”. I would like to get “My name is” (cancel "; " and starts with capital letter). How to do it?

> originalString = "; my name is"
> newString = originalString.Delete(0,2)
> Dim array() As Char = newString.ToCharArray
> array(0) = Char.ToUpper(array(0))
> newString = New String(array)
1 Like

@Krzysztof

Please check below thread and use Sentence Case to do this.

Hi @Krzysztof

Try the below code
assign your text into any variable as string datatype
var1 = “; my name is”.Replace(“;”,string.Empty).Trim()
char.ToUpper(var1(0))+var1.Substring(1)

1 Like