returns the original string with leading whitespace removed.
| 57 | |
| 58 | // returns the original string with leading whitespace removed. |
| 59 | SIValue AR_LTRIM(SIValue *argv, int argc, void *private_data) { |
| 60 | if(SIValue_IsNull(argv[0])) return SI_NullVal(); |
| 61 | |
| 62 | char *trimmed = argv[0].stringval; |
| 63 | |
| 64 | while(*trimmed == ' ') { |
| 65 | trimmed ++; |
| 66 | } |
| 67 | |
| 68 | return SI_DuplicateStringVal(trimmed); |
| 69 | } |
| 70 | |
| 71 | // returns a string containing the specified number of rightmost characters of the original string. |
| 72 | SIValue AR_RIGHT(SIValue *argv, int argc, void *private_data) { |
no test coverage detected