took out several strlen() calls out of the loop; replaced int's with size_t where needed
Merge pull request #112 from KostyaKow/master

took out several strlen() calls out of the loop; replaced int's with siz...