Compare commits

...

2 Commits

Author SHA1 Message Date
Adam Millerchip dbc2a91b15 Use a binary comprehension
Instead of converting to a charlist and back.
2019-11-07 11:12:57 +09:00
Adam Millerchip cc9e0386f0 Add hexdocs link to readme 2019-11-04 22:00:12 +09:00
2 changed files with 7 additions and 3 deletions

View File

@ -95,3 +95,9 @@ LineBot.APIClient.get("richmenu/list")
### Flex Message Update
Recent additions to the Flex message API have not been added yet.
## Online Documentation
Documentation for this package is available online at [Hexdocs](https://hexdocs.pm/line_bot/) and interactively in iex via [`h/1`](https://hexdocs.pm/iex/IEx.Helpers.html#h/1), for example:
iex> h LineBot

View File

@ -182,9 +182,7 @@ defmodule LineBotSample do
code
|> String.trim()
|> String.upcase()
|> String.to_charlist()
|> Enum.map(&(&1 + 0x1F1A5))
|> List.to_string()
|> (&for(<<cp::utf8 <- &1>>, into: "", do: <<cp + 0x1F1A5::utf8>>)).()
log_and_reply(request_message, %Message.Text{text: code}, reply_token)
end