I like C
Finally got string trim to work: https://paste.sr.ht/~yerinalexey/57acd40f094337ca6be81084c0cf74add7ebf972
@yyp I don't do C (usually) but...
- ... this is fairly easy to follow.
- ... those test cases don't actually assert that it's working apart from not returning NULL, right?
@iooioio Yes, those tests don't do anything related to testing (asserting non-NULL is to ensure I have enough memory to handle those strings), I just added them to visually see if the calculations are right.
Proper tests would look like this: https://paste.sr.ht/~yerinalexey/055e79fbc13c51fa14a341b44e30d399817a8b1b
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.