manipulation masterclass by the vb gods. in this masterclass, we will learn how to use some of the...
Post on 30-Dec-2015
212 Views
Preview:
TRANSCRIPT
Manipulation Manipulation MasterclassMasterclass
By the VB GodsBy the VB Gods
In this masterclass, we will learn how In this masterclass, we will learn how to use some of the string to use some of the string manipulation function such as manipulation function such as Len, Len, RRight, Left, Mid, Trim, Ltrim, Rtrim, ight, Left, Mid, Trim, Ltrim, Rtrim, Ucase, Lcase, Instr, Val, Str ,Chr and Ucase, Lcase, Instr, Val, Str ,Chr and Asc.Asc.
Listen closelyListen closely
LENLEN
The length function returns an The length function returns an integer value which is the length of a integer value which is the length of a phrase or a sentence, including the phrase or a sentence, including the empty spaces.empty spaces.
RIGHTRIGHT
The Right function extracts the right The Right function extracts the right portion of a phrase.portion of a phrase.
Takes up less space in the data files Takes up less space in the data files
LEFTLEFT
The Left function extract the left The Left function extract the left portion of a phrase.portion of a phrase.
Takes up less space in the data files Takes up less space in the data files
LTRIMLTRIM
The Ltrim function trims the empty The Ltrim function trims the empty spaces of the left portion of the spaces of the left portion of the phrase. phrase.
Takes up less space in the data files Takes up less space in the data files
RTRIMRTRIM
The Rtrim function trims the empty The Rtrim function trims the empty spaces of the right portion of the spaces of the right portion of the phrase.phrase.
Takes up less space in the data files Takes up less space in the data files
TRIMTRIM
The trim function trims the empty The trim function trims the empty spaces on both side of the phrase.spaces on both side of the phrase.
Takes up less space in the data files Takes up less space in the data files
MIDMID
The Mid function extracts a substring The Mid function extracts a substring from the original phrase or string.from the original phrase or string.
INSTRINSTR
The InStr function looks for a phrase The InStr function looks for a phrase that is embedded within the original that is embedded within the original phrase and returns the starting phrase and returns the starting position of the embedded phrase. position of the embedded phrase.
UCASE and LCASEUCASE and LCASE
The Ucase function converts all the The Ucase function converts all the characters of a string to capital characters of a string to capital letters. On the other hand, the Lcase letters. On the other hand, the Lcase function converts all the characters function converts all the characters of a string to small letters.of a string to small letters.
STR and VALSTR and VAL
The StrThe Str is the function that converts is the function that converts a number to a string while the Val a number to a string while the Val function converts a string to a function converts a string to a number. The two functions are number. The two functions are important when we need to perform important when we need to perform mathematical operations.mathematical operations.
CHR and ASCCHR and ASC
The Chr function returns the string The Chr function returns the string that corresponds to an ASCII code that corresponds to an ASCII code while the Asc function converts an while the Asc function converts an ASCII character or symbol to the ASCII character or symbol to the corresponding ASCII code. corresponding ASCII code.
Your task Your task
Write a program with trimWrite a program with trim VB exercises should be in the form of VB exercises should be in the form of
a task sheet such as theones on the a task sheet such as theones on the learning VB moodle page learning VB moodle page
top related