Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Friday, July 3, 2015

JavaScript String Functions: Learn Here

Method/PropertyDescription
anchor()Creates an instance of the tag with the NAME attribute set to the string passed to the method.
big()Converts the string into an instance of the tag.
blink()Converts the string into an instance of the tag.
bold()Converts the string into an instance of the tag.
charAt()Returns the character at the index passed to the method.
charCodeAt()Returns the ISO-Latin-1 number of the character at the index passed to the method.
concat()Concatenates the two strings passed to return a new string. This method was added in JavaScript 1.2.
fixed()Converts the string into an instance of the , fixed pitch font tag.
fontcolor()Sets the COLOR attribute of an instance of the tag.
fontsize()Sets the SIZE attribute of an instance of the tag.
fromCharCode()Returns the string value of the ISO-Latin-1 number passed to the method.
indexOf()Returns the index of the first occurrence of the string passed to the method within an instance of a String object.
italics()Converts the string into an instance of the tag.
lastIndexOf()Returns the index of the last occurrence of the string passed to the method within an instance of a String object.
link()Converts the string into an instance of the tag and sets the HREF attribute with the URL that is passed to the method.
match()Returns an array containing the matches found based on the regular expression passed to the method.
replace()Performs a search and replace, using the regular expression and replace string passed to the method, on the instance of a String that calls it.
search()Returns the index location of the match found in the string passed to the method. A -1 is returned if the string is not found.
slice()Returns the string between the beginning and ending index passed to the method. If a negative number is passed, the index is referenced from the end of the string passed.
small()Converts the string into an instance of the tag.
split()Returns the string split into segments defined by the string and instance limit passed to the method.
strike()Converts the string into an instance of the tag.
sub()Converts the string into an instance of the tag.
substr()Returns the string beginning with the indexed location and number of characters to return. If a negative number is passed, the index is referenced from the end of the string passed.
substring()Returns the string between the beginning and ending index passed to the method.
sup()Converts the string into an instance of the tag.
toLowerCase()Converts all the characters in the string to lowercase.
toSource()Returns the string representation of the String passed.
toString()Returns the characters passed as type string.
toUpperCase()Converts all the characters in the string to uppercase.
lengthReturns the length of the string.
prototypeProvides the ability for a programmer to add properties to instances of the String object.

Friday, December 12, 2014

String in PHP

String Functions
str_replace ->
strpos ->
str_repeat ->
strrev ->
implode ->
strstr ->
strtolower ->
strtoupper ->
rand ->
unique ->
number_format ->
ciel ->
floor ->
abs ->
round ->
add_slashes ->
strip_slashes ->
strip_tags ->
strip ->
nl2br -> convert "\n" into html <br> tag
strlen -> Get the length of string, its retutn type is Int
ucwords -> Uppercase First Char of every word
ucfirst -> Uppercase first char of string