User Tools

Site Tools


functions:character_string_functions

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
functions:character_string_functions [2019/12/23 13:00] benjaminfunctions:character_string_functions [2022/02/20 20:55] (current) benjamin
Line 6: Line 6:
   -**Character string functions**   -**Character string functions**
   -[[functions:mathematics_functions|Mathematics functions]]   -[[functions:mathematics_functions|Mathematics functions]]
-  -[[functions:others_functions|Others functions]]+  -[[functions:other_functions|Other functions]]
  
 ------ ------
Line 17: Line 17:
     Usage description : $function(input-1 = "string", input-2 = integer[, optional input-3 = "string"/integer])     Usage description : $function(input-1 = "string", input-2 = integer[, optional input-3 = "string"/integer])
  
 +  * Escaping Doublequotes: If you need to provide a doublequote within your string, you need to escape them by just providing two doublequotes instead of one. Example: 
 +    * your string is: [this is my "string"]
 +    * in a function, you need to use it this way:  ["this is my ""string"""]
 +    * as you see, the string was wrapped into double quotes, just as any string inside functions. Additionally the real doublequotes in the string just have been doubled.
  
 +*** If you want to read and store an entire text file (xml, txt, etc), see [[other_functions#$read|"$read" function]].**
 ===== $left vs $triml ===== ===== $left vs $triml =====
  
Line 29: Line 33:
  
  
-{{:playground:left-triml.jpg?nolink&800|}}+{{:functions:left-triml.jpg?nolink&800|}}
 ------ ------
 ===== $right vs $trimr ===== ===== $right vs $trimr =====
Line 41: Line 45:
  
  
-{{:playground:right-trimr.jpg?nolink&800|}}+{{:functions:right-trimr.jpg?nolink&800 |}}
 ------ ------
 ===== $middle vs $between ===== ===== $middle vs $between =====
Line 53: Line 57:
  
  
-{{:playground:middle-between.jpg?nolink&800|}}+{{:functions:middle-between.jpg?nolink&800|}}
 ------ ------
  
Line 68: Line 72:
 $proper(input string = "string/%variable%")\\ $proper(input string = "string/%variable%")\\
  
-{{:playground:lower-upper-proper.jpg?nolink&800|}}+{{:functions:lower-upper-proper.jpg?nolink&800|}}
 ----- -----
  
Line 81: Line 85:
  
  
-{{:playground:replace.jpg?nolink&800|}}+{{:functions:replace.jpg?nolink&800|}}
  
 {{:functions:alrep.jpg?nolink&800|}} {{:functions:alrep.jpg?nolink&800|}}
 ----- -----
 +===== $regreplace =====
  
 +    *$regreplace : Replace string in string by regex pattern.
 +
 +Usage:\\
 +$regreplace(input string ="string/%variable%", string to replace ="string/%variable%" [, replace with string ="string/%variable%")
 +
 +{{:functions:regreplace.png?nolink&800|}}
 +-------------
 ===== $leads vs $trails ===== ===== $leads vs $trails =====
  
Line 137: Line 149:
  
  All functions can be nested (functions within functions).  All functions can be nested (functions within functions).
 +
 +__Example 1__:
 +$replace($left("my strings", 6), "my", "your") {{:functions:FFAStrans_compute.jpg?nolink&50|}} your str
 +
 +__Example 2__:
 +$upper($triml($trimr("function number 131 is useful", 10), 9)) {{:functions:FFAStrans_compute.jpg?nolink&50|}} NUMBER 131
 +
 +------------------------------------------
 +
 +<html>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</html>[[functions:character_string_functions|Back to top]]
  
functions/character_string_functions.1577106016.txt.gz · Last modified: 2020/11/16 19:08 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki