Add common.join_and_trail.

master
voussoir 2021-05-29 08:45:15 -07:00
parent 22f320532b
commit 93bd3ee912
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 14 additions and 0 deletions

View File

@ -144,6 +144,20 @@ function post(url, data, callback)
request.send(data);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// STRING TOOLS ////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
common.join_and_trail =
function join_and_trail(l, s)
{
if (l.length === 0)
{
return "";
}
return l.join(s) + s
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// HTML & DOM //////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////