Check out example codes for "how to swap string characters in c++". It will help you in understanding the concepts better.

Code Example 1

#include <string> #include <algorithm>  std::string s = "03/02"; std::swap(s[1], s[4]);</textarea>          <div class="answer_source">Source: <a target="_blank" href="https://stackoverflow.com/questions/8196037/c-string-swap-character-places">stackoverflow.com</a></div>         <br/>

Learn ReactJs, React Native from akashmittal.com