2. String #
Created Sunday 03 May 2020
- Collection of character
- present in iostream, or
- = does deep copy. Common sense
- Copy constructor does deep copy
-
- is used for concatenation
- .substr(a, b) takes the substring from ‘a’ of length b.(incl a) ignores if b > length.
- .**substr(a) **from a to the end
- **s1.compare(s2) **- returns 0 if they are equal. positive if s1 comes before s2 in lexicographic order, else negative
- **s.length() **same as s.size()
- substrn(start, length)