User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

joinstr [2007/02/15 03:53] (current)
Line 1: Line 1:
 +# $EPIC: joinstr.txt,​v 1.2 2007/02/15 03:53:35 jnelson Exp $
 +$[[joinstr]](//​seperator//​ //var1// //var2//)
 +This function joins two word lists together with a seperator. Formally:
 +This function returns a word list wherein the **N**th word of the return
 +value is the string catenation of the **N**th word of $//var1//, the 
 +//​seperator//,​ and the **N**th word of $//​var2//​. ​ Please note that //var1//
 +and //var2// must be variable names, not the values themselves.
 +You can join together more than two variables in this way: just list the
 +variable names. ​
 +If one variable has less words than another variable, then the empty value
 +is used to hold the place of any missing words.
 +If you had two variables, one containing nicks and the other containing
 +user@hosts, you might use a function like [[copattern]] to turn user@host
 +wildcards into nicknames. ​ But if you wanted to create nick!user@hosts,​
 +you could use this function:
 + @nicks = [one two three]
 + @userhosts = []
 + @nuh = joinstr(! nicks userhosts)
 + echo $nuh
 +would output
 + one! two! three!
 +The [[joinstr]] function first appeared in EPIC4-1.1.8.
 +The ability to join more than two variables first appeared in EPIC4-1.1.15.
joinstr.txt ยท Last modified: 2007/02/15 03:53 (external edit)