Visual Basic 6 function "lcfirst"

Go back

Below you'll find the source for the Visual Basic 6 function lcfirst.

Attribute VB_Name = "modLcfirst"
' This function is downloaded from:
' You may freely distribute this file but please leave all comments, including this one, in it.
' @Author Stefan Thoolen <>

Option Explicit

' Make a string's first character lowercase
' Same syntax as the PHP function 'lcfirst'
' See also:
' @param    String  tstr        The input string
' @return   String              The string with the first char to lower case
' @author   Stefan Thoolen <>
Public Function lcfirst(tstr As String) As String
    lcfirst = LCase(Left(tstr, 1)) & Right(tstr, Len(tstr) - 1)
End Function