Strings Flashcards
What does the right string(function) do?
Extract the right portion of a string.
What is the code to show the length for something?
Len(“___”) = ___
What is the code used in a right string?
Right (“string”,n)
Example:
Right(“Visual Basic”,4)=asic
N is the number of characters from the right of the string we want to extract.
What is the left string(function)?
Extracts the left portion of a string.
Give an example of a left string:
Left (“string”,n)
Example:
Left (“visual basic”, 4) = visu
What is a mid string?
Extracts a substring from the original string: Mid(“string”,n,m)
Where n is the number of characters from the left of the string and m the number if characters we want to extract.
Give an example of mid string:
Mid (“visual basic”,4,5) = ual b
What is the instr function?
Looks at a string of characters embedded within the original string and returns the starting position if the embedded string.
Instr ([n], “string”, “substring”)
An example of a instr function is:
Instr(“visual basic”, “basic”) = 8
The Ucase and Lcase functions convert…
A string into all uppercase and all lowercase.
Ucase(string) / Lcase(string)
Example: Ucase (“Visual Basic”) = “VISUAL BASIC”
What does Asc do?
Returns the ASCII value if a character.
What does Chr return?
The corresponding charcter to an ASCII value.
Example: Asc(“A”)=65 Chr(65) = “A”