PDF Presentation - Uplinq
PDF Presentation - Uplinq
PDF Presentation - Uplinq
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Strings (cont.)<br />
• Don't call strlen() on #defined strings or strings that are<br />
in-lined<br />
– Use (int)(sizeof(string)-1) or an appropriately defined macro<br />
• See if a built in string function exists to meet your<br />
use case<br />
– There are many built in string functions, some obscure<br />
• Iterate once through the string for complex operations<br />
– Each pass through a string can be viewed as a linear search in cost<br />
– For highly complex string operations consider implementing a<br />
state machine<br />
13