mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-30 23:23:07 +00:00 
			
		
		
		
	Update src/core/string.c
Co-authored-by: John W Higgins <wishdev@gmail.com>
This commit is contained in:
		| @@ -582,9 +582,9 @@ static size_t trim_help_leftedge(JanetByteView str, JanetByteView set) { | ||||
| } | ||||
|  | ||||
| static size_t trim_help_rightedge(JanetByteView str, JanetByteView set) { | ||||
|     for (size_t i = str.len - 1; i > 0; i--) | ||||
|         if (!trim_help_checkset(set, str.bytes[i])) | ||||
|             return i + 1; | ||||
|     for (size_t i = 0; i < str.len; i++) | ||||
|         if (!trim_help_checkset(set, str.bytes[str.len - i - 1])) | ||||
|             return str.len - i; | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose