Why is there a different string class in every C++ platform out there?

前端 未结 7 2053
北荒
北荒 2020-12-31 08:02

While I like programming in C++, I hate the idea of:
std::basic_string vs QString vs wxString vs .............
Doesn\'t the

7条回答
  •  情歌与酒
    2020-12-31 08:34

    std::string is great... Oh, except that it doesn't have a "Format()" call... And, it doesn't have Split() or Join()... Actually, it doesn't do a lot of things that users of strings in those "inferior" scripting language get to take for granted...

    If C++ had the ability to ADD to existing classes (like Objective-C or Ruby) then you probably wouldn't see this...

    Also, consider that C++ generally does a better job (than things like Java) at letting you create objects that behave like real native types...

提交回复
热议问题