use Vec;
/// Converts the given slice to its ASCII upper case equivalent in-place.
///
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z', but non-ASCII letters are
/// unchanged.
///
/// This function can be used to implement [`String#upcase!`] for ASCII strings
/// in Ruby.
///
/// This function is analogous to [`<[u8]>::make_ascii_uppercase`][slice-primitive].
///
/// # Examples
///
/// ```
/// # use roe::make_ascii_uppercase;
/// let mut buf = *b"ABCxyz";
/// make_ascii_uppercase(&mut buf);
/// assert_eq!(buf, *b"ABCXYZ");
///
/// let mut buf = *b"1234%&*";
/// make_ascii_uppercase(&mut buf);
/// assert_eq!(buf, *b"1234%&*");
/// ```
///
/// [`String#upcase!`]: https://ruby-doc.org/core-3.1.2/String.html#method-i-upcase-21
/// [slice-primitive]: https://doc.rust-lang.org/std/primitive.u8.html#method.make_ascii_uppercase
/// Returns a vector containing a copy of the given slice where each byte is
/// mapped to its ASCII upper case equivalent.
///
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z', but non-ASCII letters are
/// unchanged.
///
/// This function can be used to implement [`String#upcase`] and
/// [`Symbol#upcase`] for ASCII strings in Ruby.
///
/// To uppercase the value in-place, use [`make_ascii_uppercase`]. This function
/// is analogous to [`<[u8]>::to_ascii_uppercase`][slice-primitive].
///
/// # Examples
///
/// ```
/// # use roe::to_ascii_uppercase;
/// assert_eq!(to_ascii_uppercase("ABCxyz"), &b"ABCXYZ"[..]);
/// assert_eq!(to_ascii_uppercase("1234%&*"), &b"1234%&*"[..]);
/// ```
///
/// [`String#upcase`]: https://ruby-doc.org/core-3.1.2/String.html#method-i-upcase
/// [`Symbol#upcase`]: https://ruby-doc.org/core-3.1.2/Symbol.html#method-i-upcase
/// [slice-primitive]: https://doc.rust-lang.org/std/primitive.slice.html#method.to_ascii_uppercase