New topic: 

Using 'Extends' on strings?

<http://forums.realsoftware.com/viewtopic.php?t=48016>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        alexvs          Post subject: Using 'Extends' on strings?Posted: 
Wed May 29, 2013 7:32 pm                         
Joined: Fri Feb 12, 2010 1:32 pm
Posts: 227
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                alexvs          Post subject: 
Re: Using 'Extends' on strings?Posted: Wed May 29, 2013 7:33 pm                 
        
Joined: Fri Feb 12, 2010 1:32 pm
Posts: 227
Location: Switzerland                Ahhhhwww. In the second I submitted my 
post, I came across the solution. ByRef... Damn  Never mind.   
                             Top                shaosean          Post subject: 
Re: Using 'Extends' on strings?Posted: Wed May 29, 2013 9:02 pm                 
        
Joined: Mon Aug 15, 2011 10:25 pm
Posts: 287                Thanks for that, I think I will modify it for 
Replace..      
_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to