Thread View: borland.public.delphi.language.delphi.dotnet
4 messages
4 total messages
Started by VT Venkatesh
Fri, 25 Jul 2008 13:00
Trim function in Delphi
Author: VT Venkatesh
Date: Fri, 25 Jul 2008 13:00
Date: Fri, 25 Jul 2008 13:00
18 lines
1481 bytes
1481 bytes
When i try (searchword is of type string)
***********************************************************
searchWord := searchWord.Trim(['?', '\"', ',', '\''', ';', ':', '.',
'(', ')']).ToLower;
************************************************
I get an error
[DCC Error] Searcharoo.Net.pas(92): E2250 There is no overloaded version
of 'Trim' that can be called with these arguments
I think both '\"' & '\''' are creatng the problem.
(I am trying to convert from C#.The c# syntax is
searchWord = searchWord.Trim('?','\"', ',', '\'', ';', ':', '.', '(',
')').ToLower();
)
What is the correct syntax ?
venkatesh
Re: Trim function in Delphi
Author: Stephen Boyd
Date: Fri, 25 Jul 2008 13:27
Date: Fri, 25 Jul 2008 13:27
21 lines
1697 bytes
1697 bytes
VT Venkatesh wrote:
> When i try (searchword is of type string)
> ***********************************************************
> searchWord := searchWord.Trim(['?', '\"', ',', '\''', ';', ':', '.',
> '(', ')']).ToLower;
> ************************************************
> I get an error
> [DCC Error] Searcharoo.Net.pas(92): E2250 There is no overloaded version
> of 'Trim' that can be called with these arguments
> I think both '\"' & '\''' are creatng the problem.
>
>
> (I am trying to convert from C#.The c# syntax is
> searchWord = searchWord.Trim('?','\"', ',', '\'', ';', ':', '.', '(',
> ')').ToLower();
> )
>
> What is the correct syntax ?
> venkatesh
I think that you want to eliminate the backslash from '\"' and '\'''
Re: Trim function in Delphi
Author: Marc Rohloff [TeamB]
Date: Fri, 25 Jul 2008 13:42
Date: Fri, 25 Jul 2008 13:42
15 lines
1646 bytes
1646 bytes
On Fri, 25 Jul 2008 18:30:31 +0530, VT Venkatesh wrote:
> (I am trying to convert from C#.The c# syntax is
> searchWord = searchWord.Trim('?','\"', ',', '\'', ';', ':', '.', '(',
> ')').ToLower();
> )
>
> What is the correct syntax ?
Delphi doesn't use a \ as a string escape. "\"" should become '"' and
'\'' should become '''' (four single quotes).
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Re: Trim function in Delphi
Author: Robert Giesecke
Date: Fri, 25 Jul 2008 17:58
Date: Fri, 25 Jul 2008 17:58
12 lines
1238 bytes
1238 bytes
VT Venkatesh wrote:
>
> (I am trying to convert from C#.The c# syntax is
> searchWord = searchWord.Trim('?','\"', ',', '\'', ';', ':', '.', '(',
> ')').ToLower();
> )
>
> What is the correct syntax ?
> venkatesh
searchWord := searchWord.Trim(['?', #34, ',', #39, ';', ':', '.', '(', ')']).ToLower();
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads