This will handle those platforms that don't have 8-bit chars.
This is a follow up fix to review D41384, which has been committed since.
I suggest not using auto here, because it makes it harder to understand integer promotions (potential overflows or sign extensions) in the comparison.
Sorry, i completely forgot about this one :(
I think this patch needs lit tests, eg. tell the analyzer to analyze a simple strcpy() call on any -target with non-8-bit chars and see if it's still crashes or behaves incorrectly.
I think you should still getQuantity(), and then explicitly cast it to a type that's compatible with String->getLength(), so that there were no implicit integer casts around >=.