1. Tech

Your suggestion is on its way!

An email with a link to:

http://delphi.about.com/od/beginners/l/blrtlPos.htm

was emailed to:

Thanks for sharing About.com with others!

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

Pos

unit
System
category
string handling routines

declaration
function Pos(Str, Source : string): integer;

description
Returns an integer specifying the position of the first occurrence of one string within another.

Pos looks for the first complete occurence of Str in Source. If it finds one, it returns the character position in Source of the first character in Str as an integer value, otherwise it returns 0.
Pos is case sensitive.

example
var s : string;
    i : integer;
	
s:='DELPHI PROGRAMMING';
i:=Pos('HI PR',s);
//i=5;

in real code
String Types in Delphi
Understanding and managing string data types in Delphi's Object Pascal. Learn about differences between Short, Long, Wide and null-terminated strings.

see also
Delete, Copy, Length, Concat, Insert, PosEx,
Related Video
Excel Autosum Function
Add Sound to PowerPoint

©2014 About.com. All rights reserved.