Advertisements
Advertisements
प्रश्न
Describe the purpose of the following function with its syntax:
trim()
कोड लेखन
उत्तर
This function eliminates the string's leading and trailing blank spaces. The other blank spaces between the words do not change.
Example:
Strings = " Comp class";
s = s.trim();
Output: Comp class
(without the leading and trailing spaces)
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: String Handling - EXERCISES [पृष्ठ २८९]