TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: john j dumas
from: Jasen Betts
date: 2004-01-22 19:51:02
subject: [C] A strlen question

Hi john.

21-Jan-04 13:12:24, john j dumas wrote to All


 jjd> From: john j dumas 

 jjd> Does strlen count bytes outside the char range?

not explicitly, all it does is find the address of end of the string (the
first zero byte) and subtracts from that the start address of the string,

 jjd> "cat's" =   "99,97,116,"157",115"

that "157" is really a -99  (if exporessed as an signed char) and thefore
withing the "char range"  whatever that means.

anyway strlen on that will give the reult 5

 -=> Bye <=-
---
(3:640/1042)
* Origin: You think "I'm no fool!" but I am! - Spike Milligan
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.