mid
Top  Previous  Next

val = mid(string, start, length)

Returns a specified number of characters from a string.

Parameters
 
string  
 
String from which characters are returned. If not string, converted to string.  
 
start  
 
Character position in string at which the part to be taken begins. If not integer, converted to integer.  
 
length  
 
Number of characters to return. If not integer, converted to integer.  

Example

 
a = mid("ImageWarp", 5, 5)
' Returns "Warp".
a = mid("ImageWarp", 5, 30)
' Returns "Warp".
a = mid("ImageWarp", -10, 30)
' Returns "ImageWarp".