AllInWorld99 provides a reference manual covering many aspects of web programming, including technologies such as HTML, XHTML, CSS, XML, JavaScript, PHP, ASP, SQL,FLASH, jQuery, java, for loop, switch case, if, if else, for...of, for...in, for...each,while loop, blogger tips, blogger meta tag generator, blogger tricks, blogger pagination, client side script, html code editor, javascript editor with instant output, css editor, online html editor, materialize css tutorial, materialize css dropdown list,break, continue statement, label,array, json, get day and month dropdown list using c# code, CSS button,protect cd or pendrive from virus, cordova, android example, html and css to make android app, html code play,telerik show hide column, Transparent image convertor, copy to clipboard using javascript without using any swf file, simple animation using css, SQL etc. AllInWorld99 presents thousands of code examples (accompanied with source code) which can be copied/downloaded independantly. By using the online editor provided,readers can edit the examples and execute the code experimentally.


String Functions

     Usually the string is defined with in single quote or double quote in JavaScript/jQuery, in jQuery have some built in methods to manipulate the string.

Types
     charAt()
     toUpperCase()
     toLowerCase()
     replace()
     split()

i)charAt

     Find the character position from given string.

var str="Allinworld99";
var str_val=str.charAt(3);  //It returns i

ii)toUpperCase

     Convert the given string to upper case letters.

var str="Allinworld99";
var str_val =str.toUpperCase();  //It returns ALLINWORLD99

iii)toLowerCase

     Convert the given string to uppercase letters.

var str="ALLINWORLD99";
var str_val =str.toLowerCase();  //It returns allinworld99

iv)replace

     This method is used to replace word/character by another word/character.

var str="3inworld99";
var str_val=str.replace("3","All");  //It returns Allinworld99

v)split

     This method is used to split the string by using a delimiter and push it into an array.

var str="A,L,L,I,N,W,O,R,L,D";
var X=str.split(",");  //It returns ["A","L","L","I","N","W","O","R","L","D"]

Array



Example Program:- (Editor)


Editor is Loading...

Advertisement

0 comments:

Post a Comment

Total Pageviews