Extracts a substring from a string.
A string; the set of characters from string, beginning at start, of length count.
Mid(string, start, count)
Parameter |
Description |
|---|---|
string |
A string or a variable that contains one. Must be single-quotation mark or double-quotation mark delimited. |
start |
A positive integer or a variable that contains one. Position at which to start count. Positions start with 1, not 0. |
count |
A positive integer or a variable that contains one. Number of characters to return. (Zero is not valid, but it does not throw an error.) |
<cfscript>
myString="the quick brown fox jumps over the lazy dog";
WriteOutput(mid(myString,5,11));
</cfscript>
quick brown
Sign in to your account