def tone_on

cli@0.2.0.0 · cli.bend:933

import cli@0.2.0.0/cli.bend as Cli
import Base

933# A skin tone after an emoji that takes one widens it to 2; any other is
934# 2 wide alone, as East Asian Wide.
935def tone_on(takes: Bool, narrow: Bool, join: Bool, code: U32) ->
936    WidthStep:
937  match takes:
938    case True{}:
939      WidthStep{Bool.pick(Nat, narrow, 1n, 0n), EmojiBase{code, False{}, join}}
940    case False{}: WidthStep{2n, EmojiNone{}}

Uses (6)

Used by (1)