std::basic_string_view

cppreference.com

Example

main: () = {
    using std::literals::_;

    unicode: std::array = ("▀▄─"sv, "▄▀─"sv, "▀─▄"sv, "▄─▀"sv);
 
    (copy y:= 0, copy p:= 0uz)
    while y != 6 next y++ {
        (copy x:= 0)
        while x != 16 next x++ {
            std::cout << unicode[p];
        }
        std::cout << '\n';

        p = ((p + 1) % 4);
    }
}

Output

▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─
▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─
▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄
▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀
▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─▀▄─
▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─▄▀─

Back to top

cpp2reference.com licensed under CC-BY-SA and GFDL.