mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	[utils] Add join_nonempty
				
					
				
			This commit is contained in:
		| @@ -6570,3 +6570,9 @@ def remove_terminal_sequences(string): | ||||
|  | ||||
| def number_of_digits(number): | ||||
|     return len('%d' % number) | ||||
|  | ||||
|  | ||||
| def join_nonempty(*values, delim='-', from_dict=None): | ||||
|     if from_dict is not None: | ||||
|         values = operator.itemgetter(values)(from_dict) | ||||
|     return delim.join(map(str, filter(None, values))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan