Skip to main content

Mid

Mid (Function)

Format

mid( string_expression, start_expression, length_expression)

returns string_expression

Description

Returns a portion of the specified string_expression, starting from the start character, and continuing for length_expression characters or the end of the string_expression.

Example

print mid("Hello", 2, 3)
print mid("Hello", 2, 999)

will display

ell
ello

See Also

Asc, Chr, Count, Countx, Explode, Explodex, Implode, Instr, Instrx, Left, Length, Ljust, Lower, LTrim, MD5, Mid, Midx, Replace, Replacex, Right, Rjust, RTrim, Serialize, String, Trim, Unserialize, Upper, Zfill

History

0.9.5bNew To Version
1.99.99.53Added length < 0
1.99.99.53Added start position < 0