Recent

Author Topic: String manipulation functions in Lazarus  (Read 11728 times)

Neojag

  • New member
  • *
  • Posts: 8
String manipulation functions in Lazarus
« on: April 28, 2008, 01:01:39 am »
I need to manipulate some strings (extract a given part from a text line in a TListBox and query a database with that information), but can't seem to find the string manipulation routines. I've tried the Delphi functions for it (AnsiMidStr() and AnsiPos()),but they don't seem to be recognized by lazarus. Any help?

Thanks!

Edit: I've included the StrUtils unit.

cyber_python

  • Jr. Member
  • **
  • Posts: 79
RE: String manipulation functions in Lazarus
« Reply #1 on: April 28, 2008, 01:18:26 am »
You mean that you have included the StrUtils unit and still can't use them ? Strange, because I can see the functions in StrUtils (Lazarus 0.9.24b) :
line 24 : function AnsiPos(const substr,s : string) : SizeInt;
line 77 : Function AnsiMidStr(const AText: AnsiString; const AStart, ACount: Integer): AnsiString;inline;

Try ctl+click on the StrUtils declaration on your Uses clause and see if you can find those functions.

Neojag

  • New member
  • *
  • Posts: 8
RE: String manipulation functions in Lazarus
« Reply #2 on: April 28, 2008, 01:37:29 am »
Sorry, newbie mistake, I had just included it in the .lpr file!
Working fine now ;) Thanks anyway!

 

TinyPortal © 2005-2018