हिंदी

Describe the purpose of the following function with its syntax: trim() - Computer Applications

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 [पृष्ठ २८९]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 4 String Handling
EXERCISES | Q VIII. 2. | पृष्ठ २८९
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×