mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06:11:37 +01:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			380 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			380 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/*
							 | 
						||
| 
								 | 
							
								 * Smarty plugin
							 | 
						||
| 
								 | 
							
								 * -------------------------------------------------------------
							 | 
						||
| 
								 | 
							
								 * Type:     modifier
							 | 
						||
| 
								 | 
							
								 * Name:     string_format
							 | 
						||
| 
								 | 
							
								 * Purpose:  format strings via sprintf
							 | 
						||
| 
								 | 
							
								 * -------------------------------------------------------------
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								function smarty_modifier_string_format($string, $format)
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    return sprintf($format, $string);
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/* vim: set expandtab: */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								?>
							 |