loops - Standard way to iterate over a StringBuilder in Java? - Stack Overflow
First off, if you're interning lots of strings, you're doing something very wrong.
More generally, StringBuilder
implements CharSequence
, just like String
. Use an ordinary counter-based for
loop and charAt()
.
Read full article from loops - Standard way to iterate over a StringBuilder in Java? - Stack Overflow
No comments:
Post a Comment