How do you reverse a string in place in C or C++?

前端 未结 30 1950
长发绾君心
长发绾君心 2020-11-22 00:37

How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?

30条回答
  •  别那么骄傲
    2020-11-22 01:23

    In case you are using GLib, it has two functions for that, g_strreverse() and g_utf8_strreverse()

提交回复
热议问题