Manual:DIL Manual/tolower()
Jump to navigation
Jump to search
tolower()
Function (string). Returns a string in lower case.
tolower(s : string)
Returns a copy of s with every capital letter made small:
tolower("HELLO!") is "hello!". s itself is not changed.
Parameters
| Name | Type | Meaning |
|---|---|---|
| s | string | The string. |
Returns
String: s in lower case; "" for an empty string or one never set.
Notes
- Only the letters A to Z change; letters outside ASCII stay as they are.
==on strings already ignores case. Usetolower()where case does
matter: file names, getcmd(), replace(),<and>.
Example
dilbegin got_mail();
var
ml : unitptr;
code
{
ml := restore(tolower(self.name), null);
if (ml != null)
{
act("<div class='mail'>You have a sudden urge to visit the post office.</div>",
A_ALWAYS, self, null, null, TO_CHAR);
destroy(ml);
}
quit;
}
dilend
From mail.zon: at login, checks whether mail was stored for the player under their name in lower case.