User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:lowerfirst

(lowerfirst: String) → String

This macro produces a version of the given string, where the first alphanumeric character is lowercase, and other characters are left as-is.

Example usage:

(lowerfirst: " College B") is the same as " college B"

Details:

If the first alphanumeric character cannot change case (for instance, if it's a number) then nothing will change in the string. So, “8DX” won't become “8dX”.

The results of this macro for non-ASCII characters currently depends on the player's browser's Unicode support. For instance, 'İ' in lowercase should be 'i̇', but some browsers don't support this.

See also:

harlowe/lowerfirst.txt · Last modified: 2017/06/18 22:52 by l