Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Created October 31, 2011 15:59
Show Gist options
  • Select an option

  • Save sunnyone/1327828 to your computer and use it in GitHub Desktop.

Select an option

Save sunnyone/1327828 to your computer and use it in GitHub Desktop.
irc_message.c strlen sample
if (strlen(msg->parameter[i]) > 0 && strchr(msg->parameter[i], ' ') == NULL) {
g_string_append_printf(string, " %s", msg->parameter[i]);
} else {
g_string_append_printf(string, " :%s", msg->parameter[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment