11.01.2015 Views

PDF Presentation - Uplinq

PDF Presentation - Uplinq

PDF Presentation - Uplinq

SHOW MORE
SHOW LESS

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!