| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [C] A strlen question |
Hi Jasen. 22-Jan-04 19:51:03, Jasen Betts wrote to john j dumas JB> Hi john. JB> 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? There's no such think in the C language. basically "char" is what C calls a byte, often C treats chars as signed so they commonly range from -128 to +127 but otherwise they are basically the same the bytes you see in other languages, debuggers, hex dumps etc.... so the 157 byte in C wouild look like a char with a value of -99 Strlen just measures the distance from the start of the string to the end of the string. it'll help you determine how much spoace the data in the string is ocupying. in C strings can't contain character 0 as that value is reserved to indicate the end of the string -=> Bye <=- ---* Origin: Black Holes were created when God divided by zero! (3:640/1042) 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™.