Mid Function, Mid Statement

ཡིག་རྒྱུན་གསལ་བརྗོད་ཀྱི་གསལ་བཀོད་འབད་ཡོད་མི་ཆ་ཚད་དེ་སླར་ལོགཔ (མི་ཌི་ལས་འགན) ཡང་ན་ཡིག་རྒྱུན་གསལ་བརྗོད་གཅིག་ཁར་ཡིག་རྒྱུན་གཞན་གྱི་ཆ་ཚད་ཚབ་བཙུགསཔ་ཨིན (གསལ་བཤད་འབྲིང་མ).

Syntax:


Mid (Text As String, Start As Long [, Length As Long])
Mid (Text As String, Start As Long, Length As Long, Text As String)

Return value:

ཡིག་རྒྱུན (only by Function)

Parameters:

ཚིག་ཡིག: ཡིག་རྒྱུན་གསལ་བརྗོད་གང་རུང་དེ་ཁྱོད་ཀྱིས་ལེགས་བཅོས་འབད་ནི་ཨིན་མི།

Start: Numeric expression that indicates the character position within the string where the string portion that you want to replace or to return begins. The minimum allowed value is 1. The maximum allowed value is 2,147,483,648.

Length: Numeric expression that returns the number of characters that you want to replace or return. The maximum allowed value is 2,147,483,648.

མི་ཌི་ལས་འགན་ནང་གི་ཚད་བཟུང་གི་རིང་ཚད་དེ་བསྐྱུར་ཡོད་པ་ཅིན་ ཡིག་རྒྱུན་གསལ་བརྗོད་ནང་ཡིག་འབྲུ་ཚུཆ་མཉམ་གནས་ས་འགོ་བཙུགས་ལས་མཇུགས་བསྡུ་ལུ་ཡིག་རྒྱུན་དེ་སླར་ལོག་ཡོདཔ་ཨིན།

མི་ཌི་གསལ་བཤད་ ནང་གི་ཚད་བཟུང་དེ་རིང་ཚད་དེ་ཁྱོད་ཀྱིས་ཚབ་བཙུགས་ནི་གི་ཚིག་ཡིག་གི་རིང་ཚད་ལས་ཉུང་མ་ཅིན་ ཚིག་ཡིག་དེ་གསལ་བཀོད་འབད་ཡོད་མི་རིང་ཚད་ལུ་མར་ཕབ་འབད་ཡོདཔ་ཨིན།

ཚིག་ཡིག: ཡིག་རྒྱུན་དེ་ (མིཌི་གསལ་བཤད་)ཡིག་རྒྱུན་གསལ་བརྗོད་ལུ་ཚབ་བཙུགས་ནི།

Error codes:

༥ ནུས་མེད་བྱ་སྒོའི་ལམ་ལུགས་བོད་བརྡ་

Example:


Sub ExampleMid_Function_and_Statement
  original_text = "This is the original Text"
' Mid as function 
  msgbox Mid( original_text , 13, 8) ' returns the word original
  msgbox original_text               ' original_text not modified
' Mid as statement 
  Mid( original_text, 13, 8, "new" )
  msgbox original_text               ' returns This is the new Text
End Sub