c++模拟实现python的string类

Pystring是c++函数的集合,使用c++模拟了python的string类的接口和行为,实现了c++ string类不具备的一些方法,如str.istitle(),str.endwith()等等

编译命令:

g++ test.cpp -o test -include pystring.h pystring.cpp

github链接:https://github.com/iloveacm4/cppstring/tree/master

posted @ 2022-03-01 15:32  iloveacm  阅读(78)  评论(0编辑  收藏  举报