MID$ returns the specified number of characters starting at Position% of the argument string value.


Syntax

MID$(StrExpr$, Position%, [Length%])

Arguments

  • StrExpr$ is a string expression
  • Position% is the starting position of the substring 
  • Length% is an optional integer value containing the number of characters for the substring to contain

Remarks

  1. NullString is considered as a DETERMINED empty string 
  2. If Length% is omitted, the full remaining part of the string is adopted.

Examples

MID$("NullString", 3, 1)  returns "NullString"


MID$("Qnowledge Wageningen", 8, 6)  returns "ge Wag"


MID$("Qnowledge Wageningen", 8)  returns "ge Wageningen"


MID$("Qnowledge Wageningen", 8, 50)  returns "ge Wageningen"


 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview


  • No labels