00001 /** @file psString.h 00002 * 00003 * @brief Contains the declarations of string utility functions 00004 * 00005 * @ingroup SysUtils 00006 * 00007 * String utility functions defined shall provide basic string copying 00008 * capabilities. 00009 * 00010 * @author Eric Van Alst, MHPCC 00011 * 00012 * @version $Revision: 1.10 $ $Name: rel5_0 $ 00013 * @date $Date: 2005/02/17 19:26:24 $ 00014 * 00015 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 00016 */ 00017 00018 #ifndef PS_STRING_H 00019 #define PS_STRING_H 00020 00021 #include "psType.h" 00022 00023 /** This macro will convert the argument to a quoted string */ 00024 #define PS_STRING(S) #S 00025 00026 // Doxygen group tags 00027 00028 /** @addtogroup SysUtils 00029 * @{ 00030 */ 00031 00032 /** Copies the input string 00033 * 00034 * This function shall allocate memory to the length of the input string 00035 * plus one and copy the input string to the newly allocated memory. 00036 * 00037 * @return char* Copy of input string 00038 * 00039 */ 00040 char *psStringCopy( 00041 const char *str 00042 /**< Input string of characters to copy */ 00043 ); 00044 00045 /** Copies the input string up to the specified number of characters 00046 * 00047 * This function shall allocate memory to the length specified by nChar 00048 * plus one and copy the input string to the newly allocated memory. 00049 * This function will only copy nChar bytes from the input to new string, 00050 * so if the input string is larger than nChar characters the copied 00051 * string will be a substring of the input string. If the input string 00052 * is smaller than nChar bytes then the remaining bytes allocated will 00053 * be set to NULL. 00054 * 00055 * @return char* Copy of input string 00056 * 00057 */ 00058 00059 /*@null@*/ 00060 00061 char *psStringNCopy( 00062 const char *str, 00063 /**< Input string of characters to copy */ 00064 00065 psS32 nChar 00066 /**< Number of bytes to allocate for string copy */ 00067 ); 00068 00069 /* @} */// Doxygen - End of SystemGroup Functions 00070 00071 #endif
1.3.9.1