1 / 29

11-5 String Manipulation Functions

11-5 String Manipulation Functions. Because a string is not a standard type, we cannot use it directly with most C operators. Fortunately, C provides a set of functions to manipulates strings. Topics discussed in this section:. String Length and String Copy

sheilad
Download Presentation

11-5 String Manipulation Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 11-5 String Manipulation Functions Because a string is not a standard type, we cannot use it directly with most C operators. Fortunately, C provides a set of functions to manipulates strings. Topics discussed in this section: String Length and String Copy String Compare and String Concatenate Character in String Search for a Substring and Search for Character in Set String Span and String Token String to Number Computer Science: A Structured Programming Approach Using C

  2. PROGRAM 11-11 Add Left Margin Computer Science: A Structured Programming Approach Using C

  3. PROGRAM 11-11 Add Left Margin Computer Science: A Structured Programming Approach Using C

  4. FIGURE 11-14 String Copy Computer Science: A Structured Programming Approach Using C

  5. FIGURE 11-15 String-number Copy Computer Science: A Structured Programming Approach Using C

  6. Note Always use strncpy to copy one string to another. Computer Science: A Structured Programming Approach Using C

  7. PROGRAM 11-12 Build Name Array in Heap Computer Science: A Structured Programming Approach Using C

  8. PROGRAM 11-12 Build Name Array in Heap Computer Science: A Structured Programming Approach Using C

  9. PROGRAM 11-12 Build Name Array in Heap Computer Science: A Structured Programming Approach Using C

  10. FIGURE 11-16 Structure for Names Array Computer Science: A Structured Programming Approach Using C

  11. FIGURE 11-17 String Compares Computer Science: A Structured Programming Approach Using C

  12. Table 11-1 Results for String Compare Computer Science: A Structured Programming Approach Using C

  13. FIGURE 11-18 String Concatenation Computer Science: A Structured Programming Approach Using C

  14. FIGURE 11-19 Character in String (strchr) Computer Science: A Structured Programming Approach Using C

  15. FIGURE 11-20 String in String Computer Science: A Structured Programming Approach Using C

  16. FIGURE 11-21 String Span Computer Science: A Structured Programming Approach Using C

  17. FIGURE 11-22 Streams Computer Science: A Structured Programming Approach Using C

  18. PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C

  19. PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C

  20. PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C

  21. Table 11-2 String-to-Number Functions Computer Science: A Structured Programming Approach Using C

  22. FIGURE 11-23 Parsing with String Token Computer Science: A Structured Programming Approach Using C

  23. PROGRAM 11-14 Parsing a String with String Token Computer Science: A Structured Programming Approach Using C

  24. PROGRAM 11-14 Parsing a String with String Token Computer Science: A Structured Programming Approach Using C

  25. PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C

  26. PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C

  27. PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C

  28. PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C

  29. PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C

More Related