🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9390

Re: Removing the first characters from an AnsiString

#9390
From: Andrue Cope [TeamB]
Date: Fri, 09 Jul 2004 15:37
30 lines
1874 bytes
Feico wrote:

> Both. And I expect my program to be more readable.
> I have also tried SubString(start, VeryLargeInteger) but this
> produced an empty string.

This will improve clarity and in the long run will reduce typing:

AnsiString RightStr( AnsiString const & Stringgy,
                     int                Start )
{
  return Stringgy.SubString( Start, Stringgy.Length() );
}

Then you'd have:

MyString="Hello";

AnsiString newString=RightStr( MyString, 2 ); // "llo"

This will incur a slight performance hit but it will be very slight
compared to what AnsiString is already doing. In my experience
AnsiString is a very good general purpose string but some of its
functions are slow. For 95% of apps this won't matter but we have a
text indexing application and we had to ditch AnsiString for the main
engine.
-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <40eebba9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <iabte0dcm02cs1v9rev2t5v1o9pobutjq8@4ax.com> <40eeb5a9$1@newsgroups.borland.com> <v0ete09gvmhn4q9fub2i365a5l41305re3@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5283040413ac3961
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@spammy.com>
Subject: Re: Removing the first characters from an AnsiString
Newsgroups: borland.public.cppbuilder.nativeapi
References: <iabte0dcm02cs1v9rev2t5v1o9pobutjq8@4ax.com> <40eeb5a9$1@newsgroups.borland.com> <v0ete09gvmhn4q9fub2i365a5l41305re3@4ax.com>
User-Agent: XanaNews/1.16.3.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <40eebba9$1@newsgroups.borland.com>
Date: 9 Jul 2004 08:37:13 -0700
X-Trace: newsgroups.borland.com 1089387433 217.207.223.34 (9 Jul 2004 08:37:13 -0700)
Lines: 30
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail