Recent

Author Topic: String Function Documentation  (Read 593 times)

dgrhoads

  • Newbie
  • Posts: 4
String Function Documentation
« on: August 12, 2019, 04:01:45 am »
The TYPE STRING has many associated functions which include:

VAR
st  : STRING;
BEGIN
// a few of the string functions are listed below.
st.IndexOF(...)
st.IndexOfAny (...)
st.Length
st.Compare (...)
etc.

These functions are displayed when one types the period after the "st" in the editor.  It would be very useful to see the documentation for them as the listing of arguments is often insufficient to know how they are used.

I would be deeply grateful if someone could point me to where all the many functions associated with STRING are documented.  I did not see them documented in the SourceForge documentation for the indexes of fcl, rtl or lcl.

ASBzone

  • Full Member
  • ***
  • Posts: 240
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: String Function Documentation
« Reply #1 on: August 12, 2019, 04:27:40 am »
The TYPE STRING has many associated functions which include:

You may find the following instructive, or at least a good start...

https://forum.lazarus.freepascal.org/index.php?topic=39100.0   (especially this thread)
https://www.freepascal.org/docs-html/rtl/classes/tstrings.indexof.html
https://wiki.freepascal.org/String
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.5 r61666 / FPC v3.2.0-beta-r42593 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1903 (Build 18362.295)
Other Systems: Windows 10 Pro x64, Version 1809 or greater

dgrhoads

  • Newbie
  • Posts: 4
Re: String Function Documentation
« Reply #2 on: August 12, 2019, 05:11:42 am »
Thanks.  I checked them out.

Your second reference is to TStrings which is significantly different from STRING.
Your third reference had a few functions, but nowhere near the full list that is potentially available.

Is there a reason why documentation of STRING and all its functions should not be included in either the RTL or FTL index of objects?

Any other suggestions.

RAW

  • Hero Member
  • *****
  • Posts: 785
Re: String Function Documentation
« Reply #3 on: August 12, 2019, 05:38:15 am »
http://www.delphibasics.co.uk/Article.asp?Name=Text
http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings
http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings&Sub=Calcs
https://www.programering.com/a/MDO5EjNwATI.html
http://www.marcocantu.com/epascal/English/ch07str.htm

In general nobody here cares about Strings. Strings are deprecated and very important the next version 2.0.5 will not have any Strings at all, because nobody needs this ancient bullshit anymore... GET OVER IT !!!
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 2.0.4 FPC 3.0.4 - TRUNK 2.1.0 FPC 3.3.1

dsiders

  • Full Member
  • ***
  • Posts: 215
Re: String Function Documentation
« Reply #4 on: August 12, 2019, 06:09:51 am »
Thanks.  I checked them out.

Your second reference is to TStrings which is significantly different from STRING.
Your third reference had a few functions, but nowhere near the full list that is potentially available.

Is there a reason why documentation of STRING and all its functions should not be included in either the RTL or FTL index of objects?

Any other suggestions.

I believe what you're asking for is in TStringHelper, and it is documented at: https://www.freepascal.org/docs-html/current/rtl/sysutils/tstringhelper.html
Lazarus 2.0.2 / FPC 3.0.4 / Windows 8.1 64-bit

Thaddy

  • Hero Member
  • *****
  • Posts: 8521
Re: String Function Documentation
« Reply #5 on: August 12, 2019, 07:57:51 am »
Yes, that is the correct link.
They are part of the fthe sysutils unit. They are  Delphi compatible.
That means you can also use the Delphi documentation and examples.
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SysUtils.TStringHelper_Methods
« Last Edit: August 12, 2019, 08:02:50 am by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

simone

  • Full Member
  • ***
  • Posts: 200
Re: String Function Documentation
« Reply #6 on: August 12, 2019, 09:42:49 am »

In general nobody here cares about Strings. Strings are deprecated and very important the next version 2.0.5 will not have any Strings at all, because nobody needs this ancient bullshit anymore... GET OVER IT !!!


Do you refer to TStrings, the abstract base class from which TStringList descends?

PascalDragon

  • Hero Member
  • *****
  • Posts: 529
  • Compiler Developer
Re: String Function Documentation
« Reply #7 on: August 12, 2019, 09:59:57 am »

In general nobody here cares about Strings. Strings are deprecated and very important the next version 2.0.5 will not have any Strings at all, because nobody needs this ancient bullshit anymore... GET OVER IT !!!


Do you refer to TStrings, the abstract base class from which TStringList descends?
Don't know what they're ranting about, cause it makes no sense in any way except if it should have been meant ironic...

simone

  • Full Member
  • ***
  • Posts: 200
Re: String Function Documentation
« Reply #8 on: August 12, 2019, 10:17:27 am »
I also don't understand... If TString is deprecated, then also TStringList is... What is his replacement? Generic containers?

Thaddy

  • Hero Member
  • *****
  • Posts: 8521
Re: String Function Documentation
« Reply #9 on: August 12, 2019, 11:18:28 am »
That was a joke - or stupid - . Easy string handling is a core feature of the Pascal language and always will be.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

RAW

  • Hero Member
  • *****
  • Posts: 785
Re: String Function Documentation
« Reply #10 on: August 12, 2019, 02:50:08 pm »
Oh, did I miss something? This  :D or that  :P or these  :) :)  ... mmmh, so funny ...
Anyway.. sue me !
Windows 7 Pro (x64 Sp1) And Windows XP Pro (x86 Sp3) - LAZARUS 2.0.4 FPC 3.0.4 - TRUNK 2.1.0 FPC 3.3.1

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7322
Re: String Function Documentation
« Reply #11 on: August 12, 2019, 04:17:09 pm »
This functionality is implemented by so called "helpers".

If I look in my last snapshot of the FPC trunk documentation, open rtl.chm and search for "string helper", I see a "tstringhelper" in the list, and if I click that the documentation opens. See screenshot

ASBzone

  • Full Member
  • ***
  • Posts: 240
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: String Function Documentation
« Reply #12 on: August 14, 2019, 02:00:55 am »
Thanks.  I checked them out.
...
Any other suggestions.

But you appear to have missed the TStringHelper link that was referenced in that first thread, and contains the info you seek
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.5 r61666 / FPC v3.2.0-beta-r42593 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1903 (Build 18362.295)
Other Systems: Windows 10 Pro x64, Version 1809 or greater