|
|
JavaScript string functionsJavaScript has many string functions to manage our scripts. We will discuss more about these functions with examples here.
We can use them along with many other different function to get our desired output. Here are some of them .
How to declare a string object and use its properties with examples.
We can convert any text or string from Lower case to Upper Case text by using this function.
We can convert Upper case text to Lower case text by using this function
Bold function changes the font style to bold.
We can count the total number of chars present including the blank space by using length function.
We can specify a location and get the character present their by using charat function.
We can add two or more strings by using concat function.
This returns the first occurrence of a substring within the main string.
We can use replace function to search and replace part of a string
We will use charat and length property to reverse a string
Before sending a string over network we can escape it.
We can use search function to search for a part of a string inside a main string.
Slice function can be used to collect part of a string by saying start and length of the substring.
WE can collect part of a main string by using substring function.
We can extract userid and domain part of an email address by using different string functions.
We can change the case of the text entered by using unblour event handler.
Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum
| |
| | |
|
|
|
|
|