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:
' http://www.stefanthoolen.nl/archive/vb6-functions/
' 
' You may freely distribute this file but please leave all comments, including this one, in it.
' 
' @Author Stefan Thoolen <mail@stefanthoolen.nl>

Option Explicit

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