4 ms·
As a serious response, if you're looking for a good string library, look up RapidString. I've used it to great effect for a few years now. The original owner di
by junon 5y ago
As a serious response, if you're looking for a good string library, look up RapidString. I've used it to great effect for a few years now. The original owner disappeared so there are only a number of surviving forks, but the code is clear, fast and Just Works.
- quotemstr 5y agoOr just write C++. Or Rust. Please don't write new code in C.
- 4gotunameagain 5y agoOr just realize that your coding requirements and environment does not apply to everybody, and stop repeating obsolete and silly comments. C will be here for new code for a long time, whether you/we like it or not
- quotemstr 5y agoC will be here a long time, but it shouldn't be. There's still zero reason to write new code in C. None. If you need to integrate with a legacy codebase, fine. But for new code? C++ is better in every possible way.
- vardump 5y agoWhile I agree Rust might be the future, there are a ton of platforms where C is still the only real option. Like for example many microcontrollers. Or legacy computer systems. But I do give you that the number of use cases where C is required are decreasing rapidly.
- yesenadam 5y ago> There's still zero reason to write new code in C. How about "I like it"? (I used to program in C++ 20 years ago..but not in many years. I just prefer C.)
- me_me_me 5y agoC is small language designed and used for efficiency. Straightforward C will let you manipulate data easily and will be maintainable. Its not bloated with feature creep like C++ is. Some modern C++ code looks like an Egyptian hieroglyphics. So please don't write code in C++ /s
- quotemstr 5y agoSo don't write C++ in a style you hate. What's so hard about that?
- me_me_me 5y ago/s is to show sarcasm, so you might be missing point of my reply Bitching about lang A > lang B is sign of immaturity. Every language had/has a use and arguing about what is better doesnt get anyone anywhere.
- quotemstr 5y agoSo it'd be immature to suggest that we shouldn't write new code in BASIC or COBOL? Give me a break. Some language wars are the mark of immaturity, sure. Others are the result of a mature career of dealing with shitty legacy code in a language practically guaranteed to produce it.
- me_me_me 5y ago> So it'd be immature to suggest that we shouldn't write new code in BASIC or COBOL? Its immature to suggest rewriting backend of some bank written in COBOL half a century ago, because Go lang is so much better. That would be a suicide. No sane person will propose to use COBOL for brand new project. Again my point is that bashing - modern, in use - languages is stupid thing to do. Current languages are used for a reason. Speed, convenience, libs, support etc. Going back to C++ vs C. Have a look at Linux kernel written in C++. Languages are tools, and each tool has its purpose and should be chosen for a purpose.
- junon 5y agohahahahaha. okay.
- mmastrac 5y agoThanks - I was considering writing a string library for a small project but this looks awesome
- cassepipe 5y agoYou should also have a look the simple yet efficient sds : https://github.com/antirez/sds https://github.com/antirez/sds
- 1_player 5y ago> The original owner disappeared so there are only a number of surviving forks, but the code is clear, fast and Just Works. Drop something great onto humanity, leave to do your own thing, away from the haters and whiners. That's a chad move right there.