manipulation masterclass by the vb gods. in this masterclass, we will learn how to use some of the...

15
Manipulation Manipulation Masterclass Masterclass By the VB Gods By the VB Gods

Upload: nancy-poole

Post on 30-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

Manipulation Manipulation MasterclassMasterclass

By the VB GodsBy the VB Gods

Page 2: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 3: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 4: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 5: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,
Page 6: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 7: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 8: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 9: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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

Page 10: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 11: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 12: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 13: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 14: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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.

Page 15: Manipulation Masterclass By the VB Gods. In this masterclass, we will learn how to use some of the string manipulation function such as Len, Right, Left,

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