Download presentation
Presentation is loading. Please wait.
Published byElaine Brown Modified over 6 years ago
1
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 6 String Manipulation and More Controls
2
The Insert Method Insert method: used to insert characters anywhere within a string startIndex argument: specifies where in the string to insert the value string argument: the string being manipulated value argument: the character(s) to be inserted Microsoft Visual Basic 2005: Reloaded, Second Edition
3
The Insert Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
4
The Insert Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
5
The Insert Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
6
The Insert Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
7
The Insert Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
8
Search a String for One or More Characters
StartsWith method: determines whether a specific sequence of characters occurs at the beginning of a string EndsWith method: determines whether a specific sequence of characters occurs at the end of a string subString argument: the sequence of characters to be searched for StartsWith and EndsWith methods: Return Boolean values Perform a case-sensitive search Microsoft Visual Basic 2005: Reloaded, Second Edition
9
Search a String for One or More Characters (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
10
Search a String for One or More Characters (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
11
Search a String for One or More Characters (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
12
Search a String for One or More Characters (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
13
Search a String for One or More Characters (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
14
The Contains Method Contains method:
Determines if a string contains a specific sequence of characters Is a method of the String class subString argument: represents the sequence of characters to be searched for string argument: the string in which to search Microsoft Visual Basic 2005: Reloaded, Second Edition
15
The Contains Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
16
The Contains Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
17
The Contains Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
18
The Contains Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
19
The Contains Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
20
The IndexOf Method IndexOf method: returns an integer representing the location of a substring within a string Performs a case-sensitive search subString argument: sequence of characters to be searched for string argument: the string to be searched startIndex argument: the starting position for the search (zero-relative) Microsoft Visual Basic 2005: Reloaded, Second Edition
21
The IndexOf Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
22
The IndexOf Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
23
The IndexOf Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
24
The IndexOf Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
25
The IndexOf Method (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
26
Accessing Characters Contained in a String
SubString method: accesses any number of characters contained in a string startIndex argument: index of the first character to be accessed (zero-relative) string argument: the string containing the characters to be accessed count argument: number of characters to be accessed Microsoft Visual Basic 2005: Reloaded, Second Edition
27
Accessing Characters Contained in a String (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
28
Accessing Characters Contained in a String (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
29
Accessing Characters Contained in a String (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
30
Accessing Characters Contained in a String (continued)
Microsoft Visual Basic 2005: Reloaded, Second Edition
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.