Next: , Previous: str_trunc, Up: Strings   [Contents]


4.20 str_dtokcnt

count the number of tokens in a string.

Synopsis

#include <suplib/str.h>

size_t str_dtokcnt(
  const char *string,
  char *delim
);

Parameters

const char *string

string to parse

char *delim

the delimiters to use

Description

str_dtokcnt parses a string in the same manner as str_dtoksplit and returns the number of tokens. It does not alter the string.

Returns

It returns the number of tokens in the string.

Author

Diab Jerius