New answers tagged strings
2
votes
Rust program to print citations in Chicago author-date style
Nice project! From previous experience writing citation formatting in Rust (just a small side project) I would advise you to not try to follow the standards to the letter, that is just a extreme pile ...
0
votes
1
vote
Accepted
Integer array to string
result is not zero-terminated. You should allocate one byte more.
To my taste, there are too many allocations. Compute the required size, and allocating once. You ...
3
votes
Generic splitting in Haskell
I agree with the previous poster that behavior of split is unexpected and should be changed, but instead of talking about that, I will add a few style suggestions.
My first suggestion is to put your ...
2
votes
Accepted
Split large strings into parts by last index of character and by max length
since your method is for requests payloads, you need to use memory-friendly approaches. I don't know how often the method would be called, and how much requests at average your application would ...
2
votes
4
votes
Accepted
Split string by last occurence of character within a range
You can use the index and range operators instead of SubString calls
...
2
votes
Accepted
Text splitter using Regular Expressions in Python
Include spaces after commas. It's a virtually costless habit and it helps
with code readability and editability.
Constants are typically named with uppercase. Your program begins with
several ...
0
votes
Modify a string by identifying a substring, and replace it and the characters following it with a newly computed substring
Create a function that does the replacing
It is good practice to create a function for what you are doing. A function will have a name that describes what it is doing, and it clearly defines the input ...
1
vote
Accepted
OAuth implementation for Puredata
Almost certainly, Coverity is simply looking for all uses of strcat, strcpy, sprintf, etc., ...
1
vote
Top 50 recent answers are included
Related Tags
strings × 2845java × 634
python × 460
c × 380
c++ × 377
performance × 359
algorithm × 348
c# × 317
beginner × 312
javascript × 216
programming-challenge × 212
python-3.x × 126
parsing × 124
array × 123
regex × 120
interview-questions × 98
formatting × 91
php × 79
c++11 × 73
reinventing-the-wheel × 73
comparative-review × 66
search × 61
ruby × 58
file × 55
random × 55