/ Set a STRING new PSZ value. */ /
| 249 | /* Set a STRING new PSZ value. */ |
| 250 | /***********************************************************************/ |
| 251 | bool STRING::Set(PCSZ s) |
| 252 | { |
| 253 | if (!s) |
| 254 | return false; |
| 255 | |
| 256 | uint len = strlen(s) + 1; |
| 257 | |
| 258 | if (len > Size) { |
| 259 | char *p = Realloc(len); |
| 260 | |
| 261 | if (!p) |
| 262 | return true; |
| 263 | else |
| 264 | Strp = p; |
| 265 | |
| 266 | } // endif n |
| 267 | |
| 268 | strcpy(Strp, s); |
| 269 | Length = len - 1; |
| 270 | return false; |
| 271 | } // end of Set |
| 272 | |
| 273 | /***********************************************************************/ |
| 274 | /* Set a STRING new PSZ value. */ |
no test coverage detected