| 19 | return pos ? int(pos - string.ptr) : -1; |
| 20 | } |
| 21 | int strcmp(NULLCArray a, NULLCArray b) |
| 22 | { |
| 23 | if(!a.ptr || !b.ptr) |
| 24 | { |
| 25 | nullcThrowError("strcmp: one of input strings is null"); |
| 26 | return -1; |
| 27 | } |
| 28 | return ::strcmp(a.ptr, b.ptr); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | #define REGISTER_FUNC(funcPtr, name, index) if(!nullcBindModuleFunction("std.string", (void(*)())NULLCString::funcPtr, name, index)) return false; |