Skip to contents

Make the tail part of a thought bubble

Usage

bubble_tail(animal, thought_sym = "o")

bubble_tail2(max_char_length, thought_sym = "o")

Arguments

animal

(character) a string

thought_sym

(character) scalar character to use for the speech bubble tail (see https://en.wikipedia.org/wiki/Speech_balloon). default: "o"

max_char_length

(numeric) length of the maximum line. this is used to determine how much whitespace padding to add to the left of thought_sym

Details

bubble_tail uses the animal as input so that the tail is put close to the top of the animal, whereas bubble_tail2 just puts the tail about a 1/3 of the way from the left most character given the max character length

See also

Other bubble: bubble_say()

Examples

bubble_tail(animals[["chicken"]])
#> [1] "      o"  "       o"
cat(bubble_tail(animals[["chicken"]]), sep = "\n")
#>       o
#>        o
cat(bubble_tail(animals[["chicken"]]), sep = "\n")
#>       o
#>        o
cat(bubble_tail(animals[["chicken"]], "%"), sep = "\n")
#>       %
#>        %

bubble_tail2(59)
#> [1] "                    o"  "                     o"
cat(bubble_tail2(59), sep = "\n")
#>                     o
#>                      o
cat(bubble_tail2(11), sep = "\n")
#>     o
#>      o
cat(bubble_tail2(11, "%"), sep = "\n")
#>     %
#>      %