Download presentation
Presentation is loading. Please wait.
1
Topics discussed in this section:
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 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
Always use strncpy to copy one string to another.
Note Always use strncpy to copy one string to another. Computer Science: A Structured Programming Approach Using C
7
Build Name Array in Heap
PROGRAM 11-12 Build Name Array in Heap Computer Science: A Structured Programming Approach Using C
8
Build Name Array in Heap
PROGRAM 11-12 Build Name Array in Heap Computer Science: A Structured Programming Approach Using C
9
Build Name Array in Heap
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
Results for String Compare
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 String Span Computer Science: A Structured Programming Approach Using C
17
FIGURE Streams Computer Science: A Structured Programming Approach Using C
18
Demonstrate String to Long
PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C
19
Demonstrate String to Long
PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C
20
Demonstrate String to Long
PROGRAM 11-13 Demonstrate String to Long Computer Science: A Structured Programming Approach Using C
21
String-to-Number Functions
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
Parsing a String with String Token
PROGRAM 11-14 Parsing a String with String Token Computer Science: A Structured Programming Approach Using C
24
Parsing a String with String Token
PROGRAM 11-14 Parsing a String with String Token Computer Science: A Structured Programming Approach Using C
25
Compare Packed String Function
PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C
26
Compare Packed String Function
PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C
27
Compare Packed String Function
PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C
28
Compare Packed String Function
PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C
29
Compare Packed String Function
PROGRAM 11-15 Compare Packed String Function Computer Science: A Structured Programming Approach Using C
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.