- prototype in string.h - sets up to first n bytes of str to ch - if n > strlen(str) then strlen(str) replaces n