Skip to content
  • This project
    • Loading...
  • Sign in

Barry / rf-depot

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Graphs
  • Network
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • rf-depot
  • ..
  • sa
  • strcmp.c
  • root's avatar
    added the rest · 5fa3b884
    5fa3b884
    root committed 2020-05-02 06:11:47 +0000
strcmp.c 306 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <PR/os.h>
#include "common.h"

/*
 * Extra stdlib function not supplied by libultra
 */

int strcmp(const u8 *s, const u8 *t)
{
    while (*s && *t && (*s == *t)) {
        ++s;
        ++t;
    }
    if (*s < *t)
        return -1;
    if (*s > *t)
        return 1;
    else
        return 0;
}