As one would expect, there is a small code penalty for the SafeString library over the standard string processing library.:
void setup() {
// put your setup code here, to run once:
char result[5];
int count;
Serial.begin(9600);
while (!Serial) ;
// count = strlcpy(result, "Test", sizeof(result)); // Flash: 10540, data: 1516
strcpy(result, (char *) "Test"); // 10252 1516
Serial.println(result);
}
void loop() {
}
Personally, I'm not in favor of runtime checks in the code. I have no good reason for feeling that way, but it makes me feel like I'm using C with training wheels.