On my project mush this is actually made a global function by having God run the command
@function/priveleged JOIN=#16/FUN_JOINat startup.
&HELP_FUNCTIONS_JOIN [v(dbref_help_object)]=
########################################################################
"Function: join(<list>\[,<old separator>)\]\[,<new separator>\])
"
"This function expects a word list and two optional separator characters.
"The list is separated into words using the old separator, and is
"rejoined into a new string using the new separator.
"
"If the old separator is not defined, a space is used by default.
"If the new separator is not defined, the new string has no separators
"at all.
"
"This can be used to concatenate a list of words together into a single
"string, or to replace one separator with another.
"
"If the list is empty, you get an empty list back. If the list only
"contains one word (as defined by the old separator) you get the list
"back unchanged.
"
"Continued in: functions join2
-
&HELP_FUNCTIONS_JOIN2 [v(dbref_help_object)]=
"Examples:
" say join(aa bb cc)
" You say, "aabbcc"
" say join(aa:bb:cc,:,)
" You say, "aabbcc"
" say join(aa bb cc,,:)
" You say, "aa:bb:cc"
" say join(aa:bb:cc,:,\%b)
" You say, "aa bb cc"
" say join(aa:bb:cc,:,\%,)
" You say, "aa,bb,cc"
"
"See also: functions joinn
-
# /quote -w -0 !"unprettify -v FUN_JOIN <~/MyMush/multipage.pretty"
&FUN_JOIN [v(dbref_functions_object)]=
[switch(
words(%0,%1),
#-*,words(%0,%1),
0,,
1,%0,
2,first(%0,%1)%2[rest(%0,%1)],
first(%0,%1)%2[join(rest(%0,%1),%1,%2)]
)]
-
| Frames Homepage | Non-Frames Homepage |
|
In memory of those who died Sept. 11, 2001 at the World Trade Center, the Pentagon, and on American Airlines Flight 11, United Airlines Flight 175, American Airlines Flight 77, and United Airlines Flight 93 | |
|---|---|---|
|
Honoring Marsh & McLennan professionals I've worked with,
including: Jack Aron, Valerie Hanna, Joe Sisolak, Greg Reda, and Cathy Fagan. |
||
| Shattered Photoessay by James Nachtewy | ||
Comments may be sent to gyles19@nospam.visi.com
This document last updated Tuesday, 19-May-1998 19:38:01 CDT.