Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Closed Thread
Thread Tools Display Modes
Old 05-09-2017, 11:31 AM
robert robert is offline
Senior Member
Join Date: Sep 2014
Posts: 381
Default Divide String

I have a string


How can I divide it in two equal parts
Old 05-09-2017, 12:36 PM
bobgambler bobgambler is offline
Junior Member
Join Date: Apr 2017
Posts: 2

Procedure DivideString(pString : String);
Var vPart1, vPart2 : String;
vPart1 := Copy(pString, 1, (Length(pString) div 2));
vPart2 := Copy(pString, ((Length(pString) div 2) + 1), Length(pString));
Old 05-09-2017, 03:01 PM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,268

If you can devide a string with an Odd length in 2 equal parts you're a genious!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 08:20 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.