C: evaluate part of the string
- by Halst
I cant find an expression to evaluate a part of a string.
I want to get something like that:
if (string[4:8]=='abc') {...}
I started writing like this:
if (string[4]=='a' && string[5]=='b' && string[6]=='c') {...}
but if i need to evaluate a big part of string like
if (string[10:40] == another_string) {...}
then it gets to write TOO much expressions. Are there any ready-to-use solutions?