User Tools

Site Tools


playground:playground

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
Next revisionBoth sides next revision
playground:playground [2021/09/12 23:44] craigtplayground:playground [2021/09/17 22:10] craigt
Line 1: Line 1:
-====== Coalesce(value1value2…) ====== +====== Decode(methodtext) ====== 
-Category:  Special function +Category:  Web function
 \\  \\ 
 =====Description===== =====Description=====
-This function returns the first value in the argument list that is //not// an [[syntax:types#empty_values|empty value]]. +This function decodes a text string using one of the available methods below.
- +
-\\  +
-=====Alternate formats===== +
-This function can take from 2 to 6 values as arguments. +
-  coalesce(value1, value2, value3, value4, value5, value6)+
  
 \\  \\ 
 =====Arguments===== =====Arguments=====
 ^Argument^Type^Description^ ^Argument^Type^Description^
-|valueN|Any|A value tested to determine whether it represents an //empty value// or not.| +|method  Text |The decoding method to use on //text//.  See the table below.  
- +|text  |Text |The text string to be decoded.  | 
-**Return value type:** Any (The type of the returned, non-empty value.)+**Return value type:** Text.
  
 \\  \\ 
-=====Remarks===== +^Method  ^Notes  ^ 
-To use the function with more than 6 argumentsnest function calls. Keep in mind that arguments are evaluated before a function is evaluated+|'uriComponentEscape' |Unescapes a URIand then converts any plus characters ("+") into spaces| 
- +|'Base64' | 
-If all arguments are empty values, an empty value is returned.+|'Base64url' | Base64 in URL encoding |
  
 \\  \\ 
 =====Examples===== =====Examples=====
-  coalesce(empty()'ABC', '')  //Returns 'ABC' +  decode("uriComponentEscape""one%2Bone")  //Returns 'one+one'
- +
-  coalesce(empty(), '', 'ABC' //Returns '' (Empty text value but not an empty value.) +
- +
-  coalesce(empty(),empty())  //Returns an empty value  (All arguments are empty values.) +
- +
-  coalesce(empty(), coalesce('ABC',empty()) ,'XYZ' //Returns 'ABC'  (Nested functions)+
  
 \\  \\ 
 =====See also===== =====See also=====
-  * [[syntax:functions:empty|Empty()]] +  * [[syntax:functions:encode|Encode(method, text)]] 
-  * [[syntax:functions:pick|Pick(indexvaluesseparator)]]+  * [[syntax:functions:hexdecode|HexDecode(encodinghex_text)]] 
 +  * [[syntax:functions:uridecode|URIDecode(encodingvalue)]] 
  
playground/playground.txt · Last modified: 2024/04/11 21:06 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki