User Tools

Site Tools


syntax:functions:sanitize

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:sanitize [2018/08/15 08:35] dmitrysyntax:functions:sanitize [2021/08/14 22:29] (current) – [Examples] craigt
Line 1: Line 1:
-===== Sanitize(text) =====+====== Sanitize(text) =====
 +Category:  Text function
  
-Replaces tabs and line breaks with spaces and removes hidden system characters with ASCII codes 0 to 31.+\\  
 +=====Description===== 
 +This function replaces tabs and line breaks with spaces and removes hidden system characters with ASCII codes 0 to 31 in //text//. 
 + 
 +\\  
 +=====Use cases==== 
 +This function can be used to remove unexpected unseen characters from text. 
 + 
 +\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|text|Text|The text string to clean of non-printing characters (tabs line feeds, etc.).| 
 + 
 +**Return value type:** Text 
 + 
 +\\  
 +=====Examples===== 
 + 
 +This example shows the effects of //Sanitize//
 + 
 +First, check the length of a string, including a tab character: 
 +  len('Steven' & char(9)) //Returns 7  (Length of 'Steven' (6) plus the tab) 
 + 
 +The sanitized result is the same length, but the tab character has been converted to a trailing space: 
 +  len(sanitize('Steven' & char(9))) //Returns 7 
 +  sanitize('Steven' & char(9)) //Returns 'Steven '
syntax/functions/sanitize.1534336515.txt.gz · Last modified: 2018/08/15 08:35 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki