strwrap2_ctl(emo.big, 10, wrap.always = TRUE, carry = "\033[44m", 
    pad.end = " ")

substr2_ctl(emo.6, 1, 2, type = "graphemes")

substr2_ctl(emo.6, 1, 3, type = "graphemes")

substr2_ctl(emo.6, 2, 3, type = "graphemes")

substr2_ctl(emo.6, 3, 3, type = "graphemes")

# Corner cases, effect of SGRs in emo-sequences, on OS X term they are
# excluded from flow so don't interrupt sequences.

substr2_ctl(emo.5, 1, 2, type = "width")

substr2_ctl(emo.5, 2, 3, type = "width")

substr2_ctl(emo.0.1, 2, 2, type = "width")

substr2_ctl(emo.0.1, 2, 2, type = "width", terminate = FALSE)

substr2_ctl(emo.0.1, 1, 1, type = "width", round = "stop")

substr2_ctl(emo.0.1, 1, 3, type = "width")

substr2_ctl(emo.0.1, 1, 3, type = "width", terminate = FALSE)

substr2_ctl(emo.0.1, 1, 3, type = "width", round = "stop")

# keep some trailing SGR because a non-special control intercedes

substr2_ctl(emo.0.2, 1, 3, type = "width", round = "start")

Argument `x` contains a C0 control character at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

Warning in substr_ctl_internal(x, start = start, stop = stop, type.int = TYPE.INT,  :
  Argument `x` contains a C0 control character at index [1], see `?unhandled_ctl`; you can use `warn=FALSE` to turn off these warnings.

substr2_ctl(emo.0.3, 1, 3, type = "width", round = "start")

substr2_ctl(emo.0.4, 1, 3, type = "width")

substr2_ctl(emo.0.4, 1, 3, type = "width", terminate = FALSE)

substr2_ctl(emo.0.4, 1, 2, type = "width", terminate = FALSE)

substr2_ctl(emo.0.4, 1, 2, type = "width")

`substr2_ctl<-`(emo.1, 3, 4, value = emo.0)

# weird, but correct, should be white haired light brown baby, but at least
# on tested terminal can't merge white hair onto baby.  This is b/c we are
# replacing two full UTF8 chars of person-brown with baby-brown, but the third
# hair color remains.

`substr2_ctl<-`(emo.1, 3, 4, value = emo.0, type = "width")

# Makes much more sense with width mode so the whole grapheme is replaced

`substr2_ctl<-`(emo.1, 4, 4, value = emo.0, type = "width")