Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Mar 25, 2017 6:44 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Using 'Extends' on strings?
PostPosted: Wed May 29, 2013 7:32 pm 
Offline

Joined: Fri Feb 12, 2010 1:32 pm
Posts: 228
Location: Switzerland
Since I got tired of typing when adding something to an existing string like

Dim s as String = "Foo"
s = s + "Bar"


I created a method in a module like follows:

Function Append (Extends s as String, Appendix as String)
s = s + Appendix


Now I should be able to just call

s.append "another string"


but it doesn't work. What am I doing wrong?


Top
 Profile  
 
 Post subject: Re: Using 'Extends' on strings?
PostPosted: Wed May 29, 2013 7:33 pm 
Offline

Joined: Fri Feb 12, 2010 1:32 pm
Posts: 228
Location: Switzerland
Ahhhhwww. In the second I submitted my post, I came across the solution. ByRef... Damn :) Never mind.


Top
 Profile  
 
 Post subject: Re: Using 'Extends' on strings?
PostPosted: Wed May 29, 2013 9:02 pm 
Offline

Joined: Mon Aug 15, 2011 10:25 pm
Posts: 293
Thanks for that, I think I will modify it for Replace..

_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group