/* LRL version of ANSI C header http://flash-gordon.me.uk/ansi.c.txt */ linkname ""; // 4.11 STRING HANDLING // 4.11.1 String function conventions // In LRL the equivalent of "size_t" is "count" which is a builtin, // so it's not redefined here. The same applies to "NULL" which is a // builtin in LRL called "none". // 4.11.2 Copying functions var T+> memcpy[T](var T+> s1, T+> s2, count n); var T+> memmove[T](shared var T+> s1, shared T+> s2, count n); var byte+> strcpy(var byte+> s1, byte+> s2); var byte+> strncpy(var byte+> s1, byte+> s2, count n); // 4.11.3 Concatenation functions var byte+> strcat(var byte+> s1, byte+> s2); var byte+> strncat(var byte+> s1, byte+> s2, count n); // 4.11.4 Comparison functions int memcmp[T](T+> s1, T+> s2, count n); int strcmp(byte+> s1, byte+> s2); int strcoll(byte+> s1, byte+> s2); int strncmp(byte+> s1, byte+> s2, count n); count strxfrm(var byte+*> s1, byte+> s2, count n); // 4.11.5 Search functions var T+*> memchr[T](var T+> s, int c, count n); var byte+*> strchr(byte+> s, int c); count strcspn(byte+> s1, byte+> s2); var byte+*> strpbrk(byte+> s1, byte+> s2); var byte+*> strrchr(byte+> s, int c); count strspn(byte+> s1, byte+> s2); var byte+*> strstr(byte+> s1, byte+> s2); var byte+*> strtok(byte+*> s1, byte+> s2); // 4.11.6 Miscellaneous functions byte+> memset(byte+> s, int c, count n); byte+> strerror(int errnum); count strlen(byte+> s);