Changeset 7879 for trunk/psLib/src/sys/psString.c
- Timestamp:
- Jul 12, 2006, 11:17:51 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psString.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r7852 r7879 13 13 * @author David Robbins, MHPCC 14 14 * 15 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2006-07-1 0 20:15:08$15 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2006-07-12 21:17:51 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 223 223 const char *key) 224 224 { 225 if (input == NULL ) { 226 psError(PS_ERR_BAD_PARAMETER_NULL, true, 227 "Invalid string in psStringSubstitute. Input cannot be NULL or empty.\n"); 228 return NULL; 229 } else if (strlen(input) == 0) { 230 psError(PS_ERR_BAD_PARAMETER_NULL, true, 231 "Invalid string in psStringSubstitute. Input cannot be NULL or empty.\n"); 232 return NULL; 233 } 234 if (key == NULL || strlen(key) == 0) { 235 return NULL; 225 // Empty input gives empty output 226 if (!input || strlen(input) == 0) { 227 return input; 228 } 229 // No key gives the same as the input 230 if (!key || strlen(key) == 0) { 231 return input; 236 232 } 237 233
Note:
See TracChangeset
for help on using the changeset viewer.
