Add common.join_and_trail.
This commit is contained in:
		
							parent
							
								
									22f320532b
								
							
						
					
					
						commit
						93bd3ee912
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -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 //////////////////////////////////////////////////////////////////////////////////////
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue