Re: calculating length of an substring
- From: burton.samogradNO@xxxxxxxxxxxxxx
- Date: Fri, 29 Feb 2008 13:04:12 -0600
"brasilino@xxxxxxxxx" <brasilino@xxxxxxxxx> writes:
I'm trying to calculating a substring length directly from pointer
address, like this:
char *e = NULL, *s = NULL;
int len = 0;
s = strchr (url,'.');
e = strrchr (url,'?');
len = (int) s - e;
try using braces:
len = (int) (s - e);
casting binds tighter than subtraction.
--
burton
.
- References:
- calculating length of an substring
- From: brasilino@xxxxxxxxx
- calculating length of an substring
- Prev by Date: Re: Is there stack associated when a executing an inline function?
- Next by Date: Re: calculating length of an substring
- Previous by thread: Re: calculating length of an substring
- Next by thread: Re: calculating length of an substring
- Index(es):
Relevant Pages
|