Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do I shorten a string

Posted on 2003-03-24
Medium Priority
Last Modified: 2012-06-27
I want to shorten a string and end the string with an ellipsis (total length of string + ellipsis) like this:


this is some string I want to shorten

Output string (limited to 15 characters):

this is some ...

Question by:mdlittle

Accepted Solution

jbshumate earned 1000 total points
ID: 8197618

if length(Input) > 15 then begin
  Input[13] := '.';
  Input[14] := '.';
  Input[15] := '.';

Author Comment

ID: 8197683
Thanks a bunch for the quick answer

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question