4 Reusable Code Snippet Topics

Remove Filter
Member Avatar for ~s.o.s~

Here is a simple implementation of implementing a simple Left trim (ltrim) and Right trim(rtim) of unwanted characters from a C style string. (null terminated strings). Doesn't suffer the overheads of the memmove implementation in which the worst case scenario (a string containing all junk characters) is approx. N^2 / …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for ~s.o.s~

Hello here i am posting the non recursive or no recursion implementation of outputting [B]Permutations of a string [/B]as compared to the recursive implementations previously posted. Any feedback, constructive criticism or comments are most welcome.

Member Avatar for samir1
0
2K
Member Avatar for ~s.o.s~

Hello to everyone out there. Recently many people on different forums have been asking how to make a recursive function which reverses the string passed to it. But unlike the normal recrusive funtion which only prints out the reversed string, this implementation returns a pointer to reversed string.

Member Avatar for roverphoenix
0
170
Member Avatar for ~s.o.s~

The program parses the digits in the number supplied to it and converts it to aplhabetical equivalent. Fore eg. input: 1234 output: one two three four This is a simple exercise for newbies, must try out. Tested and works under ideal input conditions.

Member Avatar for ~s.o.s~
0
183