Sha256: 3c05a1d39b8f241dbefb5e70fbba1284edbc8e0262825303514dfc42240c8411
Contents?: true
Size: 440 Bytes
Versions: 3
Compression:
Stored size: 440 Bytes
Contents
#include "../foundationallib.h" #include <assert.h> int main() { // Test cases assert(last_index_of_char("hello", 'l') == 3); assert(last_index_of_char("hello", 'o') == 4); assert(last_index_of_char("hello", 'h') == 0); assert(last_index_of_char("hello", 'z') == -1); assert(last_index_of_char("", 'a') == -1); assert(last_index_of_char("hello", '\0') == -1); printf("All tests passed!\n"); return 0; }
Version data entries
3 entries across 3 versions & 2 rubygems