Hi,

I want to create a function to test the first character of a string to see if it is lower or upper case, and change it accordingly. However, the rest of the string has to stay the same.

Dim S As String = "C:\Users\profile"


should be returned as "c:\Users\profile"

any help is much appreciated.

cheers,

jono

Recommended Answers

All 2 Replies

dim str as String = "C:\Users\profile"
str = str.Substring(0, 1).ToLower & str.Substring(1)

Gee, that simple Huh!

Cheers,

Jono

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.