#include <mplib1/safe_string.h> int Sstrlen( const char *str1 ); char *Sstrcpy( char *str1, const char *str2 );This pair of routine behaves exactly like the standard library equivalents with the exception that they behave sanely in the case of NULL pointers.
So, Sstrlen(NULL) returns 0, and SStrcpy(cp,NULL) copies an empty string, and Sstrcpy(NULL,NULL)does nothing.
These routines are provided for architectures where there is no page mapped at address 0 within a process. They primarily used internally to avoid special-casing a number of actions.