Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

fucking c functions

Name: Anonymous 2009-03-22 13:00

I need a shitty function to tell me if a string contains another - i.e. it should return true for "you are a faggot" and "asdfaggotsds" provided the second string is faggot, in c. I'm obviously too lazy to write it myself since it's a small part of an unnecessarily large homework and my inadequate googling skills prevented me from finding out what it should be - I assume /prog/ can guide me successfully as you are all [b]EXPERT PROGRAMMER[b]s who know all this shit.

Name: Anonymous 2009-03-22 18:06

man strstr you stupid faggot

c has extensive string manipulation abilities. unfortunately they are no wrapped up in a nice class.

unfortunately often people dont know of them until they are an [c]EXPERT C PROGRAMMER[/b].

If you are on a unix-type system, I recommended reading all of these -

ls /usr/share/man/man3/str*

as you may end up saving yourself a lot of work.

Having said that, I have a custom set of str functions i make use of also in my projects - things like a variadic strdup that you can pass a bunch of strings to and it concatenates them to a newly allocated string.. to make c strings a bit more convenient.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List