How to split a text string


i need split a string text

Text = <text1>,<text2>,<text3>..

can split and return text by function

getText(1) = <text1>
getText(2) = <text2>
getText(3) = <text3>
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try this...

function GetText(const aDelimiter: Char;Input: string;idx:integer):string;
  sl: TStringlist;

Open in new window

GetText(',','Text1,Text2,Text3',2) = 'Text2'

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
XSoFTzAuthor Commented:
i problem i need return type to double ?

how to fix it ?
Can you please explain more detailled what you intend to do???
XSoFTzAuthor Commented:
can coding return to double or

can convert string to double ?
string conversion to double is only possible when string value is a floating point number representation!!!

You can convert such strings using Delphi function Val() or FloatToStr()...

Please post a new question for more help!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.