Performance tweak: reduce number of function call of strlen()
Merge pull request #297 from yongzhy/fea_strlen

Performance tweak: reduce number of function call of strlen()