Update str_related.md

避免循环里面重复计算字符的长度
Merge pull request #8 from joshle/patch-1

Update str_related.md