Does anyone know of any good c++ string libraries out there? I've looked into boost and qstring and was wondering if there were any others.
The Big Programming Thread - Page 34
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
![]()
Kau
![]()
Canada3500 Posts
Does anyone know of any good c++ string libraries out there? I've looked into boost and qstring and was wondering if there were any others. | ||
GogoKodo
Canada1785 Posts
On February 10 2011 15:08 Kau wrote: C++ question: Does anyone know of any good c++ string libraries out there? I've looked into boost and qstring and was wondering if there were any others. This is relevant to my interests. Been using std::string, but it's missing some nice concatenation features that I've seen elsewhere. | ||
![]()
tofucake
Hyrule18968 Posts
If you're trying to learn just because you want to, I recommend C# over C++. If you need C++ for a course or something, you should check with your professor to make sure you're even allowed to use other libraries. Anyway, what features are you looking for? | ||
gboytazz
United States73 Posts
![]() | ||
japro
172 Posts
| ||
Antedelerium
United States224 Posts
| ||
heishe
Germany2284 Posts
On February 10 2011 15:08 Kau wrote: C++ question: Does anyone know of any good c++ string libraries out there? I've looked into boost and qstring and was wondering if there were any others. Depends. What are you trying to do with strings? I can't think of anything that isn't covered by std::string and the various boost libs (lexical_cast etc). | ||
![]()
tofucake
Hyrule18968 Posts
On February 11 2011 06:19 heishe wrote: Depends. What are you trying to do with strings? I can't think of anything that isn't covered by std::string and the various boost libs (lexical_cast etc). You sir, are the devil ![]() | ||
![]()
Kau
![]()
Canada3500 Posts
On February 11 2011 06:19 heishe wrote: Depends. What are you trying to do with strings? I can't think of anything that isn't covered by std::string and the various boost libs (lexical_cast etc). I want to be able to do everything with strings! Convert all the letters to uppercase, search it with regular expressions, tokenize, etc. | ||
![]()
tofucake
Hyrule18968 Posts
Looked a bit more into boost. It seems to have everything you need. Though putting that stuff together yourself would be fun (imo). Boost has a tokenizer and case changer (to_upper(), to_lower(), and tokenizer). Also, regex. | ||
iMbc
United States55 Posts
I'm fairly new to programming and i'm learning c# and I was wondering what kind of stuff should I start with? | ||
Cloud
Sexico5880 Posts
On February 11 2011 12:59 iMbc wrote: I have a question... I'm fairly new to programming and i'm learning c# and I was wondering what kind of stuff should I start with? IMHO certainly not c# :p. You don't wanna start out with a language designed for structured teams of developers and even less a language designed for programming windows apps (the horror). You won't be able to be nearly as productive as with more powerful languages. Python/scheme are better places to start. Resources for Python: * http://www.amazon.com/gp/product/1887902996 * Tutorials on python.org * http://www.norvig.com/index.html <- Really cool stuff, not really for a beginner but it might inspire you, also good for lisp (Scheme is a lisp dialect) Resources for Scheme: SICP (Challenging, requires a lot of dedication but well worth it) Book is free, you can google it. The little schemer Python is powerful, well documented, well recognized, widely used. Scheme is clean and small, completely lacks a syntax, probably best language to learn about actual programming without needing to learn so much about the rules of the language itself. Pick one, study the tutorials, find the community of that particular language (most important) and become a part of it. | ||
iMbc
United States55 Posts
| ||
![]()
tofucake
Hyrule18968 Posts
Also, cloud, C# isn't designed specifically for structured teams. It lends itself very well to that, but is just as easily used by individual developers. | ||
heishe
Germany2284 Posts
On February 11 2011 07:38 Kau wrote: I want to be able to do everything with strings! Convert all the letters to uppercase, search it with regular expressions, tokenize, etc. First of all: sorry, I somehow forgot about the thread yesterday. Well, boost does have a tokenizer (as far as I recall it's called string_tokenizer, haven't used it in a while) and a library for regular expressions (RegEx). By the way, regular expressions will be officially incorporated into the STL with the coming c++0x standard, which should finally arrive sometime this year. For case conversion, boost also has the String Algo library (which also has a couple of other string related classes and functions which aren't provided by the STL). | ||
Deleted User 101379
4849 Posts
On February 11 2011 13:04 Cloud wrote: IMHO certainly not c# :p. You don't wanna start out with a language designed for structured teams of developers and even less a language designed for programming windows apps (the horror). You won't be able to be nearly as productive as with more powerful languages. Python/scheme are better places to start. Resources for Python: * http://www.amazon.com/gp/product/1887902996 * Tutorials on python.org * http://www.norvig.com/index.html <- Really cool stuff, not really for a beginner but it might inspire you, also good for lisp (Scheme is a lisp dialect) Resources for Scheme: SICP (Challenging, requires a lot of dedication but well worth it) Book is free, you can google it. The little schemer Python is powerful, well documented, well recognized, widely used. Scheme is clean and small, completely lacks a syntax, probably best language to learn about actual programming without needing to learn so much about the rules of the language itself. Pick one, study the tutorials, find the community of that particular language (most important) and become a part of it. I do all my private development in C#, including linux applications. Calling C# a Windows/Microsoft-Only language only shows that people never tried to learn about it. I also found it to be a far more productive language than any other i've tried (including python, ruby, scheme, java,...). I wouldn't recommend starting with scheme, it's a very complex language and even though i like the functional programming i found it to be very... problematic when used in a pure functional environment. I very much prefer the functional extensions of C#, though, yes, i found them a lot more useful after trying scheme for a while and learning the functional thought patterns. Python is a nice language, it's ok to learn it and definatly won't hurt for private programming. It's a growing language but for professional development i don't see a market, it won't help you much if you want to find a job with the language of your choice, though it will teach you a lot of design and style aspects that will help you develop better in other languages (as do C# and Ruby). | ||
10or10
Sweden517 Posts
On February 11 2011 22:32 Morfildur wrote: I do all my private development in C#, including linux applications. Calling C# a Windows/Microsoft-Only language only shows that people never tried to learn about it. I also found it to be a far more productive language than any other i've tried (including python, ruby, scheme, java,...). I wouldn't recommend starting with scheme, it's a very complex language and even though i like the functional programming i found it to be very... problematic when used in a pure functional environment. I very much prefer the functional extensions of C#, though, yes, i found them a lot more useful after trying scheme for a while and learning the functional thought patterns. Python is a nice language, it's ok to learn it and definatly won't hurt for private programming. It's a growing language but for professional development i don't see a market, it won't help you much if you want to find a job with the language of your choice, though it will teach you a lot of design and style aspects that will help you develop better in other languages (as do C# and Ruby). I've only worked with C, C++ and Java, a part from some scripting langauges, and want to know in what way do you find C# more productive than Java? | ||
KaiserJohan
Sweden1808 Posts
Personally I think you should start with C/C++ if you intend to "go all the way"; C# is nice and easy to learn but too much is abstracted. Both C# and C++ rocks though and got plenty of support, especially if you are programming in windows. Disagree with cloud on windows apps; I love it, especially C++ against the raw win32 API. I think the message structure of windows apps are superb and easy to structure. It's true that there is bullcrap/legacy stuff in the win32 API, but so is it in any other API too, take for example in unix, select()'s first argument - highest socket descriptor value + 1... I don't like python very much. Sure it's very productive but the syntax is killing me, I really don't like the focus on indentation. But that's just because I am biased towards C-syntax languages since I grew up with it, I can very well imagine doing some quick stuff in python every now and then, but imho definately not a language to start with or focus on EDIT: If you would dabble in java, to be effective/productive you should really learn proper OO design to utilize the language to its max. | ||
Cambium
United States16368 Posts
On February 11 2011 22:41 10or10 wrote: I've only worked with C, C++ and Java, a part from some scripting langauges, and want to know in what way do you find C# more productive than Java? Yea I'm curious about this too. In my past experiences, C# was only useful with VS building front-end windows apps. I know you can write server code with it too, but I never understood/researched the advantages of using it over Java. | ||
Deleted User 101379
4849 Posts
On February 11 2011 22:46 Cambium wrote: Yea I'm curious about this too. In my past experiences, C# was only useful with VS building front-end windows apps. I know you can write server code with it too, but I never understood/researched the advantages of using it over Java. Other advantages of C# compared to java: Functional extensions, first class functions, common namings of methods and functions in the .NET library (depending on which java array class you use, it's either .size(), .getLength(), .length, .getCount(), .count(), .getLength(), ... i guess thats the drawback on being open source with no early concept), extension methods, ... Functional extensions: For example if i want the ID properties of all customer objects in an array where the customer registered before 2011 (which reminds me, C# properties are really cool, Python has similar, Java doesn't): Java (don't remember the exact syntax, it's been ~1 1/2 years since i last coded Java): Array<Integer> results = new Array<Integer>(); foreach (customer cust : sourceArray) { if (date.compare(customer.getRegisteredDate(), new date('2010-01-01')) // Don't remember the date handling of java, but reminds me... no operator overloading { results.push(customer.getId()); } } C#: IEnumberable<Int32> results = sourceArray.Where(c => c.RegisteredDate < (new DateTime(2010, 1, 1)).Select(c => c.ID); Oh, did i mention that the last time i had to use Javas date handling libraries i nearly had to scream because of how complex and unlogical it was? calendar... uhm... yes.... hope for you java folks they improved on that. Oh, and if we want to make that multi-threaded because the sourceArray is very big... we have to use third party libraries in Java or write a lot of code. C# multi-threaded (.NET 4.0): IEnumberable<Int32> results = sourceArray.AsParallel().Where(c => c.RegisteredDate < (new DateTime(2010, 1, 1)).Select(c => c.ID); Extension methods: I recently had the case that i wanted to have the position of units on a map, i stored them as instances of the Point class. I later had the case where i wanted to calculate the distances between units, so instead of creating a new class and using that everywhere, i simply created a "PointExtensions" class and added a GetDistanceTo() method to the original Point class. Oh, did i mention that visual studio 2010 is simply the best IDE i've ever used? Neither eclipse, netbeans, kdevelop, etc even comes close. I had to write Java for a year, but my knowledge is still limited and dated, if anyone wants to correct me i always welcome to learn something new, but imho C# is just a more modern language, though you still pay for it by knowing less about what happens in the background. | ||
| ||