Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

swap first and last character of string in c++

std::swap(str.front(), str.back());
 
PREVIOUS NEXT
Tagged: #swap #character #string
ADD COMMENT
Topic
Name
5+4 =