icmake/pathfile
raw| 1 | list path_file(string path) |
| 2 | { |
| 3 | list ret; |
| 4 | int len; |
| 5 | int idx; |
| 6 | |
| 7 | for (len = strlen(path), idx = len; idx--; ) |
| 8 | { |
| 9 | if (path[idx] == "/") |
| 10 | { |
| 11 | ret = |
| 12 | (list)substr(path, 0, idx) + (list)substr(path, idx + 1, len); |
| 13 | return ret; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | ret = (list)"" + (list)path; |
| 18 | return ret; |
| 19 | } |
| 20 | |
| 21 |