This is what you need to know about strings.
So let’s get started!
So what is a String?
A string is a sequence of characters, usually used to represent text. In programming, strings are a data type used to store and manipulate text-based information, such as words, phrases, and sentences.
A string method is a pre-defined function that can be used on strings in many programming languages.
The length property returns the length of a string:
substring() is similar to slice().
The difference is that substring() cannot accept negative indexes.
slice() extracts a part of a string and returns the extracted part in a new string.
The replace() method replaces a specified value with another value in a string:
The concat() method can be used instead of the plus operator. These two lines do the same:
The trim() method removes whitespace from both sides of a string:
ECMAScript 5 (2009) allows property access [ ] on strings:
The includes() method determines whether a string contains the characters of a specified string.
The charAt() method returns the character at a specified index (position) in a string:
Upper and Lower Case
A string is converted to upper case with toUpperCase():
A string is converted to lower case with toLowerCase():
A string can be converted to an array with the split() method:
The repeat() method returns a new string with a
specified number of copies of the string it was
Wrapping it up
If you want to learn about CSS FlexBox in-depth, check this Ebook