reverse.h 421 B

12345678910111213141516
  1. #pragma once
  2. #include <util/generic/fwd.h>
  3. void ReverseInPlace(TString& string);
  4. /** NB. UTF-16 is variable-length encoding because of the surrogate pairs.
  5. * This function takes this into account and treats a surrogate pair as a single symbol.
  6. * Ex. if [C D] is a surrogate pair,
  7. * A B [C D] E
  8. * will become
  9. * E [C D] B A
  10. */
  11. void ReverseInPlace(TUtf16String& string);
  12. void ReverseInPlace(TUtf32String& string);