SigServer:SignatureMath: Difference between revisions

Line 167: Line 167:


==== if ====
==== if ====
''Alias of [[#notempty|notempty();]]
''Alias of [[#notempty|notempty();]]''
 
==== lc ====
''Alias of [[#lowecase|lowercase();]]''
 
==== lowercase ====
''string'' '''lowercase'''(''mixed'' value[, ''string'' options]);
If only first argument is specified it converts all the characters to lowercase. The second argument may be "first" or "words". If it is "first" only the string's first character will be converted. If it is set to "words", every word's first character will be converted.
 
'''Example'''
lowercase("Foo Bar");          // Returns "foo bar"
lowercase("Foo Bar", "first"); // Returns "foo Bar"
lowercase("Foo BAR", "words"); // Returns "foo bAR"


==== notempty ====
==== notempty ====
  ''mixed'' '''notempty'''(''mixed'' value[, ''string'' true[, ''string'' false]]);
  ''mixed'' '''notempty'''(''mixed'' value[, ''mixed'' true[, ''mixed'' false]]);
Check's if the first argument is not empty. Returns TRUE or FALSE if the optional arguments aren't specified. If they are specified it returns the second argument if TRUE and the third argument if FALSE.
Check's if the first argument is not empty. Returns TRUE or FALSE if the optional arguments aren't specified. If they are specified it returns the second argument if TRUE and the third argument if FALSE.


'''Example'''
'''Example'''
  notempty("");                     // Returns false
  notempty("");                       // Returns false
  notempty("Foobar");               // Returns true
  notempty("Foobar");                 // Returns true
  notempty(6 > 2);                   // Returns true
  notempty(6 > 2);                   // Returns true
  notempty("", "Not empty", "Empty") // Returns "Empty"
  notempty("", "Not empty", "Empty"); // Returns "Empty"


==== padding ====
==== padding ====
Line 216: Line 228:
  truncate("Foobar", 4, ".."); // Returns "Fo.."
  truncate("Foobar", 4, ".."); // Returns "Fo.."
  truncate("Foob", 4, "..");  // Returns "Foob"
  truncate("Foob", 4, "..");  // Returns "Foob"
==== uc ====
''Alias of [[#lowecase|lowercase();]]''
==== uppercase ====
''string'' '''uppercase'''(''mixed'' value[, ''string'' options]);
If only first argument is specified it converts all the characters to uppercase. The second argument may be "first" or "words". If it is "first" only the string's first character will be converted. If it is set to "words", every word's first character will be converted.
'''Example'''
uppercase("Foo Bar");          // Returns "FOO BAR"
uppercase("foo bar", "first"); // Returns "Foo bar"
uppercase("foo BaR", "words"); // Returns "Foo BaR"


[[Category:SigServer]]
[[Category:SigServer]]
256

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.