This repository has been archived on 2022-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Luma3DS-3GX/sysmodules/loader/source/strings.c
TuxSH 21db0d45bd Added Rosalina, see details
- see release notes
- ( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)( ͡° ͜ʖ ͡°)
- (∩ ͡° ͜ʖ ͡°)⊃━☆゚
- ( ͡ᵔ ͜ʖ ͡ᵔ) ♫┌( ͡° ͜ʖ ͡°)┘♪ ♫└( ͡° ͜ʖ ͡°)┐♪
2017-06-05 02:02:04 +02:00

21 lines
391 B
C

#include "strings.h"
size_t strnlen(const char *string, size_t maxlen)
{
size_t size;
for(size = 0; *string && size < maxlen; string++, size++);
return size;
}
void progIdToStr(char *strEnd, u64 progId)
{
while(progId > 0)
{
static const char hexDigits[] = "0123456789ABCDEF";
*strEnd-- = hexDigits[(u32)(progId & 0xF)];
progId >>= 4;
}
}