mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Everywhere: Port to String::copy_characters_to_buffer()
This commit is contained in:
parent
be6cce5530
commit
852454746e
8 changed files with 39 additions and 18 deletions
|
@ -304,10 +304,9 @@ size_t strftime(char* destination, size_t max_size, const char* format, const st
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (builder.length() + 1 > max_size)
|
||||
return 0;
|
||||
strcpy(destination, builder.build().characters());
|
||||
return builder.length();
|
||||
auto str = builder.build();
|
||||
bool fits = str.copy_characters_to_buffer(destination, max_size);
|
||||
return fits ? str.length() : 0;
|
||||
}
|
||||
|
||||
long timezone = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue