|
|
|||||||
Ideas.. REF - http://Kixtart.org/board/ultimatebb.php?ubb=get_topic;f=2;t=003474 If we dig back into the MS-Access helpfile, we should also be seeing - CLNG.. http://support.microsoft.com/default.aspx?scid=kb;en-us;Q239104 I know this is not Access, but it would kinda neat to see some of these functions.. Another example, MID.. A cool function we can use from vb is Replace.. Kent [ 13 June 2002, 17:43: Message edited by: kdyer ] |
||||||||
|
|
|||||||
REPLACE would be very nice! |
||||||||
|
|
|||||||
How about this replace: code:function replace($str,$src,$rpl) [ 05. March 2003, 22:29: Message edited by: sealeopard ] |
||||||||
|
|
|||||||
sealeopard, Thats exactly the logic i use to see if a value is in an array: code:It seems faster than looping the array...$_=$ArrayDelim+Join($Array,$ArrayDelim)+$ArrayDelim [ 06. March 2003, 09:42: Message edited by: Schuliebug ] |
||||||||
|
|
|||||||
schulie, what about: code:if -1<ascan($array,$searchfor) |
||||||||
|
|
|||||||
Totally right Lonkero, just a quick way for 4.12 maybe ? Ok ok, should upgrade to 4.20... |
||||||||
|
|
|||||||
A Replace() function would absolutely brilliant! It would be nice to specify how many occurrences of the “text-to-replace” you would like replaced. (and maybe specify -1 to replace all occurrences). One other thing...I know it is a "very" simple function but a RepeatStr() function would also be very helpful - this UDF appears in so many of my scripts. Lee |
||||||||
|
|
|||||||
Hi sealeopard, it works fine. I doesn't know that join() works with more than one character as delimiter. In the helpfile stands "string character"?!? Thanks for this workaround. It would be nice if those little tricks and workaround find a way into the kixhelp.chm. |
||||||||
|
|
|||||||
I'll post a formal Replace() UDF later tonight. Stay tuned. |
||||||||
|
|
|||||||
Actually, there's no need for a new Replace() UDF as there's already one posted in the UDF Forum: Replace() - Replaces first or all occurrences of one string with another |
||||||||
|
|
|||||||
well, what about string limitations? and speed of functioning? I think the best way to do replace is just like showed in this topic. |