Deck 11: String Manipulation and Menus

Full screen (f)
exit full mode
Question
Visual Basic provides the ____ method for accessing any number of characters in a string.

A) Mid
B) Left
C) Substring
D) Right
Use Space or
up arrow
down arrow
to flip the card.
Question
____ is the syntax for inserting characters into a string.

A) string.Substring(startIndex[,numCharsToAccess])
B) string.Insert(startIndex, value)
C) string.Remove(startIndex[, numCharsToRemove])
D) string.Find(startIndex[, numCharsToFind])
Question
Each menu element is considered a(n) ____.

A) interface
B) class
C) system
D) object
Question
The Contains method always begins the search with ____.

A) the last character in the string
B) the middle character in the string
C) both ends of the string
D) the first character in the string
Question
When an expression contains more than one method, the computer processes the methods from right to left.
Question
The ____ character represents zero or more characters.

A) ?
B) *
C) #
D) .
Question
The Substring method accesses one or more characters contained in a string.
Question
A ____ character forces a literal constant to assume a data type other than the one its form indicates.

A) static type
B) conditioned type
C) literal type
D) reconditioned type
Question
To insert the value at the beginning of a string, you use a startIndex of 1.
Question
To represent a single digit in a pattern, you use the ____ character.

A) *
B) ?
C) .
D) #
Question
When processing the PadLeft and PadRight methods, the computer first makes a temporary copy of the string in memory; it then pads the copy only.
Question
To specify a different starting location in the IndexOf method, you use the optional ____ argument.

A) startIndex
B) firstIndex
C) Index
D) locateIndex
Question
The ____ character in a pattern represents one character only.

A) ?
B) *
C) #
D) .
Question
The ____ argument in the syntax of the PadRight method is an integer that represents the total number of characters you want the string's copy to contain.

A) firstChars
B) totalChars
C) countChars
D) replaceChars
Question
If you need to determine whether a string contains a specific sequence of characters, you can use the ____ method.

A) Find
B) IndexOf
C) Locate
D) Regex
Question
When processing the Insert method, the computer first makes a temporary copy of the string in memory.
Question
____ is the syntax to access characters in a string.

A) string.Find(startIndex[, numCharsToFind])
B) string.Substring(startIndex[,numCharsToAccess])
C) string.Insert(startIndex, value)
D) string.Remove(startIndex[, numCharsToRemove])
Question
The ____ method pads the string on the right, which means it inserts the padded characters at the end of the string.

A) PadLeft
B) Pad
C) TrimRight
D) PadRight
Question
____ is the syntax for removing the characters from a string.

A) string.Find(startIndex[, numCharsToFind])
B) string.Insert(startIndex, value)
C) string.Remove(startIndex[, numCharsToRemove])
D) string.Substring(startIndex[,numCharsToAccess])
Question
The most commonly used properties for a menu element are the ____ properties.

A) Name and Text
B) Name and Action
C) Action and Text
D) Label and Text
Question
In Windows applications that have an Edit menu, ____ is used to select the Paste command when the Edit menu is closed.

A) Ctrl+X
B) Ctrl+V
C) Ctrl+C
D) Ctrl+P
Question
Discuss why applications might need to work with strings.
Question
The number of characters contained in a string is stored as an integer in the string's ____________________ property.
Question
The access key allows the user to open the menu by pressing the ____ key in combination with the access key.

A) Ctrl
B) Shift
C) Alt
D) Ctrl+Alt
Question
Describe menu title captions.
Question
If an item on a menu or submenu is a command, you enter the appropriate instructions in the item's ____________________ event procedure.
Question
In Windows applications that have an Edit menu, ____ is used to select the Cut command when the Edit menu is closed.

A) Ctrl+Y
B) Ctrl+C
C) Ctrl+V
D) Ctrl+X
Question
The ____________________ method pads the string on the left, which means it inserts the padded characters at the beginning of the string.
Question
What happens when you omit the numCharsToAccess argument from the Substring method?
Question
You specify a menu item's shortcut keys in the ShortcutKeys property in the ____ window.

A) Properties
B) System
C) Menu
D) Interface
Question
Explain the difference between the Trim method and the Remove method.
Question
Explain how the Contains method works.
Question
Explain what the Like operator does.
Question
Visual Basic's ____________________ method allows you to insert characters anywhere in a string.
Question
A menu item's ____ key can be used only when the menu is open.

A) control
B) menu
C) access
D) shortcut
Question
What does the Substring method return?
Question
Commonly used menu items should be assigned ____.

A) shortcut keys
B) header keys
C) global keys
D) control keys
Question
Discuss the purpose of the access key.
Question
A menu item's ____________________ keys can be used only when the menu is closed.
Question
Explain how the PadLeft and PadRight methods work.
Question
Match between columns
Returns a -1 if the subString is not contained in the string
Trim method
Returns a -1 if the subString is not contained in the string
Remove method
Returns a -1 if the subString is not contained in the string
Contains method
Returns a -1 if the subString is not contained in the string
IndexOf method
Returns a -1 if the subString is not contained in the string
PadLeft
Returns a -1 if the subString is not contained in the string
Like operator
Returns a -1 if the subString is not contained in the string
menu strip control
Returns a -1 if the subString is not contained in the string
menu title
Returns a -1 if the subString is not contained in the string
shortcut key
Removes a specified number of characters located anywhere in a string
Trim method
Removes a specified number of characters located anywhere in a string
Remove method
Removes a specified number of characters located anywhere in a string
Contains method
Removes a specified number of characters located anywhere in a string
IndexOf method
Removes a specified number of characters located anywhere in a string
PadLeft
Removes a specified number of characters located anywhere in a string
Like operator
Removes a specified number of characters located anywhere in a string
menu strip control
Removes a specified number of characters located anywhere in a string
menu title
Removes a specified number of characters located anywhere in a string
shortcut key
Aligns the characters in a string
Trim method
Aligns the characters in a string
Remove method
Aligns the characters in a string
Contains method
Aligns the characters in a string
IndexOf method
Aligns the characters in a string
PadLeft
Aligns the characters in a string
Like operator
Aligns the characters in a string
menu strip control
Aligns the characters in a string
menu title
Aligns the characters in a string
shortcut key
Appears to the right of the menu item and allow the user to select the item without opening the menu
Trim method
Appears to the right of the menu item and allow the user to select the item without opening the menu
Remove method
Appears to the right of the menu item and allow the user to select the item without opening the menu
Contains method
Appears to the right of the menu item and allow the user to select the item without opening the menu
IndexOf method
Appears to the right of the menu item and allow the user to select the item without opening the menu
PadLeft
Appears to the right of the menu item and allow the user to select the item without opening the menu
Like operator
Appears to the right of the menu item and allow the user to select the item without opening the menu
menu strip control
Appears to the right of the menu item and allow the user to select the item without opening the menu
menu title
Appears to the right of the menu item and allow the user to select the item without opening the menu
shortcut key
Used to include one or more menus on a Windows form
Trim method
Used to include one or more menus on a Windows form
Remove method
Used to include one or more menus on a Windows form
Contains method
Used to include one or more menus on a Windows form
IndexOf method
Used to include one or more menus on a Windows form
PadLeft
Used to include one or more menus on a Windows form
Like operator
Used to include one or more menus on a Windows form
menu strip control
Used to include one or more menus on a Windows form
menu title
Used to include one or more menus on a Windows form
shortcut key
Returns the Boolean value True when the substring is contained anywhere in the string
Trim method
Returns the Boolean value True when the substring is contained anywhere in the string
Remove method
Returns the Boolean value True when the substring is contained anywhere in the string
Contains method
Returns the Boolean value True when the substring is contained anywhere in the string
IndexOf method
Returns the Boolean value True when the substring is contained anywhere in the string
PadLeft
Returns the Boolean value True when the substring is contained anywhere in the string
Like operator
Returns the Boolean value True when the substring is contained anywhere in the string
menu strip control
Returns the Boolean value True when the substring is contained anywhere in the string
menu title
Returns the Boolean value True when the substring is contained anywhere in the string
shortcut key
Removes any space characters from both the beginning and end of a string
Trim method
Removes any space characters from both the beginning and end of a string
Remove method
Removes any space characters from both the beginning and end of a string
Contains method
Removes any space characters from both the beginning and end of a string
IndexOf method
Removes any space characters from both the beginning and end of a string
PadLeft
Removes any space characters from both the beginning and end of a string
Like operator
Removes any space characters from both the beginning and end of a string
menu strip control
Removes any space characters from both the beginning and end of a string
menu title
Removes any space characters from both the beginning and end of a string
shortcut key
Displays a list of options when clicked
Trim method
Displays a list of options when clicked
Remove method
Displays a list of options when clicked
Contains method
Displays a list of options when clicked
IndexOf method
Displays a list of options when clicked
PadLeft
Displays a list of options when clicked
Like operator
Displays a list of options when clicked
menu strip control
Displays a list of options when clicked
menu title
Displays a list of options when clicked
shortcut key
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Trim method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Remove method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Contains method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
IndexOf method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
PadLeft
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Like operator
Allows you to use pattern-matching characters to determine whether one string is equal to another string
menu strip control
Allows you to use pattern-matching characters to determine whether one string is equal to another string
menu title
Allows you to use pattern-matching characters to determine whether one string is equal to another string
shortcut key
Question
What is the Windows standard for the capitalization of menu item captions?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 11: String Manipulation and Menus
1
Visual Basic provides the ____ method for accessing any number of characters in a string.

A) Mid
B) Left
C) Substring
D) Right
C
2
____ is the syntax for inserting characters into a string.

A) string.Substring(startIndex[,numCharsToAccess])
B) string.Insert(startIndex, value)
C) string.Remove(startIndex[, numCharsToRemove])
D) string.Find(startIndex[, numCharsToFind])
B
3
Each menu element is considered a(n) ____.

A) interface
B) class
C) system
D) object
D
4
The Contains method always begins the search with ____.

A) the last character in the string
B) the middle character in the string
C) both ends of the string
D) the first character in the string
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
5
When an expression contains more than one method, the computer processes the methods from right to left.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
6
The ____ character represents zero or more characters.

A) ?
B) *
C) #
D) .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
7
The Substring method accesses one or more characters contained in a string.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
8
A ____ character forces a literal constant to assume a data type other than the one its form indicates.

A) static type
B) conditioned type
C) literal type
D) reconditioned type
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
9
To insert the value at the beginning of a string, you use a startIndex of 1.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
10
To represent a single digit in a pattern, you use the ____ character.

A) *
B) ?
C) .
D) #
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
11
When processing the PadLeft and PadRight methods, the computer first makes a temporary copy of the string in memory; it then pads the copy only.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
12
To specify a different starting location in the IndexOf method, you use the optional ____ argument.

A) startIndex
B) firstIndex
C) Index
D) locateIndex
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
13
The ____ character in a pattern represents one character only.

A) ?
B) *
C) #
D) .
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
14
The ____ argument in the syntax of the PadRight method is an integer that represents the total number of characters you want the string's copy to contain.

A) firstChars
B) totalChars
C) countChars
D) replaceChars
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
15
If you need to determine whether a string contains a specific sequence of characters, you can use the ____ method.

A) Find
B) IndexOf
C) Locate
D) Regex
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
16
When processing the Insert method, the computer first makes a temporary copy of the string in memory.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
17
____ is the syntax to access characters in a string.

A) string.Find(startIndex[, numCharsToFind])
B) string.Substring(startIndex[,numCharsToAccess])
C) string.Insert(startIndex, value)
D) string.Remove(startIndex[, numCharsToRemove])
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
18
The ____ method pads the string on the right, which means it inserts the padded characters at the end of the string.

A) PadLeft
B) Pad
C) TrimRight
D) PadRight
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
19
____ is the syntax for removing the characters from a string.

A) string.Find(startIndex[, numCharsToFind])
B) string.Insert(startIndex, value)
C) string.Remove(startIndex[, numCharsToRemove])
D) string.Substring(startIndex[,numCharsToAccess])
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
20
The most commonly used properties for a menu element are the ____ properties.

A) Name and Text
B) Name and Action
C) Action and Text
D) Label and Text
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
21
In Windows applications that have an Edit menu, ____ is used to select the Paste command when the Edit menu is closed.

A) Ctrl+X
B) Ctrl+V
C) Ctrl+C
D) Ctrl+P
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
22
Discuss why applications might need to work with strings.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
23
The number of characters contained in a string is stored as an integer in the string's ____________________ property.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
24
The access key allows the user to open the menu by pressing the ____ key in combination with the access key.

A) Ctrl
B) Shift
C) Alt
D) Ctrl+Alt
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
25
Describe menu title captions.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
26
If an item on a menu or submenu is a command, you enter the appropriate instructions in the item's ____________________ event procedure.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
27
In Windows applications that have an Edit menu, ____ is used to select the Cut command when the Edit menu is closed.

A) Ctrl+Y
B) Ctrl+C
C) Ctrl+V
D) Ctrl+X
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
28
The ____________________ method pads the string on the left, which means it inserts the padded characters at the beginning of the string.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
29
What happens when you omit the numCharsToAccess argument from the Substring method?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
30
You specify a menu item's shortcut keys in the ShortcutKeys property in the ____ window.

A) Properties
B) System
C) Menu
D) Interface
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
31
Explain the difference between the Trim method and the Remove method.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
32
Explain how the Contains method works.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
33
Explain what the Like operator does.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
34
Visual Basic's ____________________ method allows you to insert characters anywhere in a string.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
35
A menu item's ____ key can be used only when the menu is open.

A) control
B) menu
C) access
D) shortcut
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
36
What does the Substring method return?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
37
Commonly used menu items should be assigned ____.

A) shortcut keys
B) header keys
C) global keys
D) control keys
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
38
Discuss the purpose of the access key.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
39
A menu item's ____________________ keys can be used only when the menu is closed.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
40
Explain how the PadLeft and PadRight methods work.
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
41
Match between columns
Returns a -1 if the subString is not contained in the string
Trim method
Returns a -1 if the subString is not contained in the string
Remove method
Returns a -1 if the subString is not contained in the string
Contains method
Returns a -1 if the subString is not contained in the string
IndexOf method
Returns a -1 if the subString is not contained in the string
PadLeft
Returns a -1 if the subString is not contained in the string
Like operator
Returns a -1 if the subString is not contained in the string
menu strip control
Returns a -1 if the subString is not contained in the string
menu title
Returns a -1 if the subString is not contained in the string
shortcut key
Removes a specified number of characters located anywhere in a string
Trim method
Removes a specified number of characters located anywhere in a string
Remove method
Removes a specified number of characters located anywhere in a string
Contains method
Removes a specified number of characters located anywhere in a string
IndexOf method
Removes a specified number of characters located anywhere in a string
PadLeft
Removes a specified number of characters located anywhere in a string
Like operator
Removes a specified number of characters located anywhere in a string
menu strip control
Removes a specified number of characters located anywhere in a string
menu title
Removes a specified number of characters located anywhere in a string
shortcut key
Aligns the characters in a string
Trim method
Aligns the characters in a string
Remove method
Aligns the characters in a string
Contains method
Aligns the characters in a string
IndexOf method
Aligns the characters in a string
PadLeft
Aligns the characters in a string
Like operator
Aligns the characters in a string
menu strip control
Aligns the characters in a string
menu title
Aligns the characters in a string
shortcut key
Appears to the right of the menu item and allow the user to select the item without opening the menu
Trim method
Appears to the right of the menu item and allow the user to select the item without opening the menu
Remove method
Appears to the right of the menu item and allow the user to select the item without opening the menu
Contains method
Appears to the right of the menu item and allow the user to select the item without opening the menu
IndexOf method
Appears to the right of the menu item and allow the user to select the item without opening the menu
PadLeft
Appears to the right of the menu item and allow the user to select the item without opening the menu
Like operator
Appears to the right of the menu item and allow the user to select the item without opening the menu
menu strip control
Appears to the right of the menu item and allow the user to select the item without opening the menu
menu title
Appears to the right of the menu item and allow the user to select the item without opening the menu
shortcut key
Used to include one or more menus on a Windows form
Trim method
Used to include one or more menus on a Windows form
Remove method
Used to include one or more menus on a Windows form
Contains method
Used to include one or more menus on a Windows form
IndexOf method
Used to include one or more menus on a Windows form
PadLeft
Used to include one or more menus on a Windows form
Like operator
Used to include one or more menus on a Windows form
menu strip control
Used to include one or more menus on a Windows form
menu title
Used to include one or more menus on a Windows form
shortcut key
Returns the Boolean value True when the substring is contained anywhere in the string
Trim method
Returns the Boolean value True when the substring is contained anywhere in the string
Remove method
Returns the Boolean value True when the substring is contained anywhere in the string
Contains method
Returns the Boolean value True when the substring is contained anywhere in the string
IndexOf method
Returns the Boolean value True when the substring is contained anywhere in the string
PadLeft
Returns the Boolean value True when the substring is contained anywhere in the string
Like operator
Returns the Boolean value True when the substring is contained anywhere in the string
menu strip control
Returns the Boolean value True when the substring is contained anywhere in the string
menu title
Returns the Boolean value True when the substring is contained anywhere in the string
shortcut key
Removes any space characters from both the beginning and end of a string
Trim method
Removes any space characters from both the beginning and end of a string
Remove method
Removes any space characters from both the beginning and end of a string
Contains method
Removes any space characters from both the beginning and end of a string
IndexOf method
Removes any space characters from both the beginning and end of a string
PadLeft
Removes any space characters from both the beginning and end of a string
Like operator
Removes any space characters from both the beginning and end of a string
menu strip control
Removes any space characters from both the beginning and end of a string
menu title
Removes any space characters from both the beginning and end of a string
shortcut key
Displays a list of options when clicked
Trim method
Displays a list of options when clicked
Remove method
Displays a list of options when clicked
Contains method
Displays a list of options when clicked
IndexOf method
Displays a list of options when clicked
PadLeft
Displays a list of options when clicked
Like operator
Displays a list of options when clicked
menu strip control
Displays a list of options when clicked
menu title
Displays a list of options when clicked
shortcut key
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Trim method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Remove method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Contains method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
IndexOf method
Allows you to use pattern-matching characters to determine whether one string is equal to another string
PadLeft
Allows you to use pattern-matching characters to determine whether one string is equal to another string
Like operator
Allows you to use pattern-matching characters to determine whether one string is equal to another string
menu strip control
Allows you to use pattern-matching characters to determine whether one string is equal to another string
menu title
Allows you to use pattern-matching characters to determine whether one string is equal to another string
shortcut key
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
42
What is the Windows standard for the capitalization of menu item captions?
Unlock Deck
Unlock for access to all 42 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 42 flashcards in this deck.