mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Add minor improvements and cleanup
This commit is contained in:
parent
9e3e985ae5
commit
feed0d2b0e
163 changed files with 2286 additions and 2245 deletions
|
@ -21,11 +21,11 @@
|
|||
|
||||
/**
|
||||
* Returns true if s has prefix.
|
||||
*
|
||||
* @param s is a NUL-terminated string
|
||||
* @param prefix is also NUL-terminated
|
||||
*/
|
||||
bool(startswith)(const char *s, const char *prefix) {
|
||||
if (s == prefix) return true;
|
||||
bool startswith(const char *s, const char *prefix) {
|
||||
for (;;) {
|
||||
if (!*prefix) return true;
|
||||
if (!*s) return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue