JCL Help:StrMid@AnsiString@SizeInt@SizeInt

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Copies part of a string.


Pascal

 function StrMid(const S: string; Start: SizeInt; Count: SizeInt): string;
function StrMid(const S: AnsiString; Start: SizeInt; Count: SizeInt): AnsiString;


Parameters

Parameters Description
const S: string Source string.
Start: SizeInt Index of the first character to copy.
Count: SizeInt Number of characters to copy.


Return Value

The string copied from S starting at offset Start and with length Count.


Description

StrMid copies the part of the source string defined by Start and Count. If Start exceeds the length of the string then an empty string is returned. The extracted sub-string can be shorter than Count if Start+Count exceed the string length.


About

Unit

JclAnsiStrings


Donator

John C Molyneux


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page