Monday, October 3, 2011

String functions

String functions with syntax

              1.addcslashes(string,characters)

                            The addcslashes() function returns a string with backslashes in front of the specified characters.

              2.addslashes(string)

                            The addslashes() function returns a string with backslashes in front of predefined characters,This is safe in a database query

              3.substr(string,start,length)

                            The substr() function returns a part of a string

              4.ucfirst()

                            Converts the first character of a string to uppercase

              5.ucwords()

                            Converts the first character of each word in a string to uppercase

              6.strtolower(),strtoupper() etc..

              7.strstr(strin,search)

                           The strstr() function searches for the first occurrence of a string inside another string.This function returns the rest of the string (from the matching point), or FALSE, if the string to search for is not found.

              8.stristr(strin,search)

                            Case-insensitive strstr

No comments:

Post a Comment