Write string operators ?
Ans.-
String operators can be used to manipulate the string in multiple ways .
·
+
:- It is known as concatenation operator used to join the strings given either
side or the operator.
·
*
:- it is known as repetition operator. It concatenates the multiple copies of
the same string.
·
[]
:- It is known as slice operator .It is used to access the sub string of
particular string .
·
[:]
:- It is known as range slice operator. It is used to access the characters
from the specified range.
·
%
:- It is used to perform string formatting.