VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Capitalizes first letter in a string and sets all other characters lowercase in one line of code.

by Psychedelic (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Capitalizes first letter in a string and sets all other characters lowercase in one line of code.

Rate Capitalizes first letter in a string and sets all other characters lowercase in one line of code.




Public Function Capitalize(Str As String) As String
Capitalize = UCase$(Strings.Left$(LCase$(Str), 1)) & Strings.Right$(LCase$(Str), Len(Str) - 1)
End Function

Download this snippet    Add to My Saved Code

Capitalizes first letter in a string and sets all other characters lowercase in one line of code. Comments

No comments have been posted about Capitalizes first letter in a string and sets all other characters lowercase in one line of code.. Why not be the first to post a comment about Capitalizes first letter in a string and sets all other characters lowercase in one line of code..

Post your comment

Subject:
Message:
0/1000 characters