You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
287 B

21 years ago
  1. Doing a for loop to iterate over a string character-by-character may be
  2. slow, since accessing a character at offset n requires us to scan the string
  3. from the beginning until the required codepoint is accessed.
  4. strlen() will return the number of codepoints which have to be calculated.