[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Overview of string.h

The string.h header file provides functions for comparing, copying, concatenating, and searching character arrays and arrays of larger items.

The function naming convention used in string.h determines the type of data structure(s) a function manipulates.

A function with an str prefix operates on character arrays terminated with a null character ('\0'). The str functions are

A function with an strn prefix operates on character arrays of a length specified as a function argument. The strn functions are:

  • "strncasecmp," string case compare with length specified
  • "strncmp" string compare with length specified
  • "strncpy" string copy with length specified
  • A function with a mem prefix operates on arrays of items or contiguous blocks of memory. The size of the array or block of memory is specified as a function argument. The mem functions are:

  • "memchr" searches a memory block for a character
  • "memcmp" compares a memory block
  • "memcpy" copies a memory block
  • "memmove" moves a memory block
  • "memset" sets a value for a memory block
  • The non standard functions with a `stri' prefix operates on strings ignoring case.


    [ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

    Visit the Metrowerks website at: http://www.metrowerks.com
    For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
    Copyright © 2000, Metrowerks Corp. All rights reserved.

    Last updated: August 16, 2000