微軟認證綜合輔導(dǎo):C#字符串函數(shù)大全3
Mid 函數(shù)示 例: 下面的示例利用 Mid 函數(shù)返回字符串中從第四個字符開始的六個字符: DimMyVar MyVar=Mid("VB 腳本 isfun!",4,6)''MyVar 包含"Script"。
Left 函數(shù)示例: 下面的示例利用 Left 函數(shù)返回 MyString 的左邊三個字母: Dim MyString, LeftString MyString = "VBSCript" LeftString = Left(MyString, 3) ''LeftString 包含 "VBS
Right 函數(shù)示例: 下面的示例利用 Right 函數(shù)從字符串右邊返回指定數(shù)目的字符: Dim AnyString, MyStr AnyString = "Hello World" ''定義字符串。 MyStr = Right(AnyString, ''返回 "d" MyStr = Right(AnyString,
'' 返回 " 。 World"。 MyStr = Right(AnyString, 20) '' 返回 "Hello World"。 C#字 符串函數(shù)大全 6、LCase 函數(shù)示例: 下面的示例利用 LCase 函數(shù)把大寫字母轉(zhuǎn)換為小寫字母: Dim MyString Dim LCaseString MyString = "VBSCript" LCaseString=LCase(MyString)''LCaseString 包含"vbscript"。
時間:2013-06-21 責(zé)任編輯:admin
相關(guān)文章
無相關(guān)信息