User Tools

Site Tools


syntax:functions:padend

Differences

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

Link to this comparison view

Next revision
Previous revision
syntax:functions:padend [2016/06/20 11:42] – created dmitrysyntax:functions:padend [2021/08/14 22:21] (current) – [Examples] craigt
Line 1: Line 1:
-===== PadEnd(text, characternumber) =====+====== PadEnd(text, pad_chartotal_len) =====
 +Category:  Text function
  
-Pads the end of //text// with //character// up to total width defined by //number//.+\\  
 +=====Description===== 
 +This function pads the end of //text// with //pad_char// up to total length defined by //total_len//.
  
- Example   Result  +\\  
-padend('99', '0', 5 99000  |+=====Arguments===== 
 +^Argument^Type^Description
 +|text|Text|The text value to be padded.| 
 +|pad_char|Text (a single character)|The character to append to the end of //text// repeatedly until the total string length of //total_len// is reached.| 
 +|total_len|Number|The total length of the result string including //text// plus all repeated instances of //pad_text//.|
  
 +**Return value type:** Text
  
-=== See also === +\\  
-  * [[syntax:functions:padstart]]+=====Remarks===== 
 +//text// and //pad_char// are implicitly converted to text values if required. 
 + 
 +Entering a value for //pad_char// longer than a single character results in an error message. 
 + 
 +Entering a value for //total_len// equal to or less than the length of //text// simply returns the value of //text//. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  padend('99', '0', 5) //Returns '99000' 
 + 
 +  padend('1000', '0', 3) //Returns '1000'  (Result length entered (3) is less than the length of '1000' (4)) 
 + 
 +\\  
 +===== See also ===== 
 +  * [[syntax:functions:padstart|PadStart(text, pad_char, total_len)]]
syntax/functions/padend.1466437359.txt.gz · Last modified: 2016/06/20 11:42 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki