Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- //string manipulation
- concat(); //Combines the text of two or more strings and returns a new string.
- indexOf(); //Returns the starting index of a substring within another string. A –1 is returned if no match is found.
- charAt(); //Returns the character at the specified location.
- lastIndexOf(); // Returns the index within the string of the last occurrence of the specified value, or -1 if not found.
- match(); // Used to match a regular expression against a string.
- substring();// A portion of a string is returned. A starting and ending location are passed to this function.
- replace(); // Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
- search(); // Executes the search for a match of a regular expression. If successful, search returns the index of the match inside the string. Otherwise, it returns -1.
- slice(); // Extracts a section of a string and returns a new string.
- split();// Splits a string into an array of strings by separating the string into substrings.
- length();// The length of the string is returned as the count of the number of characters it contains.
- toLowerCase(); // Converts the entire string to lower case.
- toUpperCase(); // Converts the entire string to upper case.
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">//string manipulation
- concat(); //Combines the text of two or more strings and returns a new string.
- indexOf(); //Returns the starting index of a substring within another string. A –1 is returned if no match is found.
- charAt(); //Returns the character at the specified location.
- lastIndexOf(); // Returns the index within the string of the last occurrence of the specified value, or -1 if not found.
- match(); // Used to match a regular expression against a string.
- substring();// A portion of a string is returned. A starting and ending location are passed to this function.
- replace(); // Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
- search(); // Executes the search for a match of a regular expression. If successful, search returns the index of the match inside the string. Otherwise, it returns -1.
- slice(); // Extracts a section of a string and returns a new string.
- split();// Splits a string into an array of strings by separating the string into substrings.
- length();// The length of the string is returned as the count of the number of characters it contains.
- toLowerCase(); // Converts the entire string to lower case.
- toUpperCase(); // Converts the entire string to upper case.
- </script></body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement