mix format run
parent
ca07be9b86
commit
dd072964ae
|
@ -8,6 +8,7 @@ defmodule Discordirc.ByteSplit do
|
||||||
@doc """
|
@doc """
|
||||||
split a string into a number `bytes`, optionally subtracting a number of `hold` bytes for prefix/suffix
|
split a string into a number `bytes`, optionally subtracting a number of `hold` bytes for prefix/suffix
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def byte_split(str, bytes, hold \\ 0) do
|
def byte_split(str, bytes, hold \\ 0) do
|
||||||
case byte_size(str) do
|
case byte_size(str) do
|
||||||
n when is_integer(n) and n > bytes ->
|
n when is_integer(n) and n > bytes ->
|
||||||
|
|
Loading…
Reference in New Issue