Real Software Forums
http://forums.realsoftware.com/

Using 'Extends' on strings?
http://forums.realsoftware.com/viewtopic.php?f=1&t=48016
Page 1 of 1

Author:  alexvs [ Wed May 29, 2013 7:32 pm ]
Post subject:  Using 'Extends' on strings?

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?

Author:  alexvs [ Wed May 29, 2013 7:33 pm ]
Post subject:  Re: Using 'Extends' on strings?

Ahhhhwww. In the second I submitted my post, I came across the solution. ByRef... Damn :) Never mind.

Author:  shaosean [ Wed May 29, 2013 9:02 pm ]
Post subject:  Re: Using 'Extends' on strings?

Thanks for that, I think I will modify it for Replace..

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/