182x wrote:is it more likley just what the strlen is counting as characters?
[man]strlen/man counts characters as characters, plain and simple. This string:
Hi
!
on my computer has 5 characters; "hi" = 2, CRLF (or "\r\n" in most programming languages) since I'm on Windows = 2, and "!" = 1. If you typed the same string in on Unix or Mac, it'd be 4 characters, since Unix and Mac use \n and \r respectively.