Topic profile page for Strlen.
This page has aggregated data from forum posts, threads, listings, online discussions, newsgroups, messageboards, and other online sources which contain user generated content for the term: Strlen.
Topic "Strlen" was discussed 5,297 times on 333 sites in last 3 months
Started 1 week, 6 days ago (2009-11-23 00:51:00)
by matrixx333
Problem using strcmp and strlen in a Linked List Hello everyone, I have created a program that counts, prints, adds and deletes nodes in a linked list. I am having a problem with the delete function of the program. The struct contains a name value (ex. Paul). When I call the fuction del_node, I am using strcmp to see if the value returned is 0, if it is, the ...
Started 3 weeks, 3 days ago (2009-11-11 18:50:00)
by wirefree101
Greetings. I seek assistance with gaining an understanding of the following code. Below I submit a sample run, followed by the code itself. Brief Synopsis: main() passes a char array reference to function getWord() which receives stdin from user. main() then attempts to print the string. Error: strlen() is unable to ascertain the correct length of the string in main(). ...
Started 1 week, 1 day ago (2009-11-28 10:57:00)
by cowa
Hi, what i'm doing wrong ? I need to write recursive function that will change from lowercase letters to cap letters . Code: char big_let(char* str) { unsigned int i; for ( i=0; i < strlen(str);i++) { if (i >= 'a' && i
Started 1 week, 1 day ago (2009-11-27 20:31:00)
by dclamp
This class i created will validate a supplied UPC code. Class PHP Code: Functions createCheckDigit($code) - When supplied with an 11 digit code, will return the check digit. No practical use, used for the class. createUPC($code) - When supplied with an 11 digit code, will return with the valid check digit amended to the code....
Started 6 days, 22 hours ago (2009-11-29 17:42:00)
by gerardorn
hey im trying to generate random strings of a given length with the alphabet that the user inputs from the command line. Code: char randchar(const char *alphabet){ int val; float mod; mod =(float) strlen(alphabet); val = (int)(mod * rand() / (RAND_MAX + 1.0)); return alphabet[val]; } this function returns the char in the ...
Started 4 days, 6 hours ago (2009-12-02 09:13:00)
by walkingbeard
Hi, I was just wondering about this function I wrote: Code: /*Reverses a string*/ char *strrev(char *in_string) { char *out_string; int in_char, out_char; out_string = (char *) calloc(strlen(in_string), sizeof(char)); in_char = strlen(in_string) - 1; for (out_char = 0; out_char < in_char+1; out_char ++) { out_string[out_char] = in_...
Started 5 days, 6 hours ago (2009-12-01 09:19:00)
by cnewbie1
This method takes two strings, then first compares the length and then uses memcmp to compare them if the length is identical. Code: int strcomp(char, char); int strcomp(char s1, char s2) { int l1 = strlen(s1); int l2 = strlen(s2); if (l1 == l2) { return memcmp(s1, s2, l1); } else { return 0; } } When ...