Lesson 12 of 24

string Class மற்றும் String ProblemsThe string Class and String Problems

10 min 30 XP

C++ string-ல் பல methods: length(), substr(pos, len), find(), replace(), += சேர்த்தல், == ஒப்பீடு. reverse(s.begin(), s.end()) மூலம் தலைகீழாக்கலாம்.

C++ strings come with length(), substr(pos, len), find(), replace(), += to append and == to compare. reverse(s.begin(), s.end()) flips a string.

Example: edit me and press Run

Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.

Challenge

+30 XP

ஒரு வரியைப் (getline) படித்து, ஒவ்வொரு சொல்லின் முதல் எழுத்தை capital ஆக்கி மீதியை small ஆக்கி print செய்யுங்கள். Input: lEARN c++ AT skill park Output: Learn C++ At Skill Park

Read a line with getline. Capitalise the first letter of every word and make the rest lowercase. Input: lEARN c++ AT skill park Output: Learn C++ At Skill Park

Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.