Difference between 2 string functions

what is the difference between s.size( ) and s.length( ) functions where s is the name of string

@Senjuti256, As per the documentation, these are just synonyms. size() is there to be consistent with other STL containers (like vector , map , etc. ) and length() is to be consistent with most peoples’ intuitive notion of character strings. People usually talk about a word, sentence or paragraph’s length , not its size, so length() is there to make things more readable

In case of any doubt feel free to ask :slight_smile:
Mark your doubt as RESOLVED if you got the answer :slight_smile: