Carp/core/carp_char.h
Jorge Acereda 9b08b6df3c Merge
2020-05-11 16:10:35 +02:00

30 lines
469 B
C

bool Char__EQ_(Char a, Char b) {
return a == b;
}
bool Char__LT_(Char a, Char b) {
return a < b;
}
bool Char__GT_(Char a, Char b) {
return a > b;
}
int Char_to_MINUS_int(Char c) {
return (int)c;
}
Char Char_from_MINUS_int(int i) {
return (Char)i;
}
Char Char_copy(const Char *c) {
return *c;
}
String PtrChar_str(const char *c) {
size_t len = strlen(c) + 1;
String ptr = CARP_MALLOC(len);
return (String)memcpy(ptr, c, len);
}