From 7d08554c3cc88a0047399e4580fe048bdf3bcbe6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 13 Aug 2025 17:59:09 +0300 Subject: [PATCH] encoding.base64: fix doc comment examples --- vlib/encoding/base64/base64.c.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/encoding/base64/base64.c.v b/vlib/encoding/base64/base64.c.v index 78441b28eb..88bce057cb 100644 --- a/vlib/encoding/base64/base64.c.v +++ b/vlib/encoding/base64/base64.c.v @@ -187,7 +187,7 @@ mut: // decode decodes the base64 encoded `string` value passed in `data`. // Please note: If you need to decode many strings repeatedly, take a look at `decode_in_buffer`. -// Example: assert base64.decode('ViBpbiBiYXNlIDY0') == 'V in base 64' +// Example: assert base64.decode('ViBpbiBiYXNlIDY0') == 'V in base 64'.bytes() pub fn decode(data string) []u8 { mut size := i64(data.len) * 3 / 4 if size <= 0 || data.len % 4 != 0 { @@ -218,7 +218,7 @@ pub fn decode_str(data string) string { // encode encodes the `[]u8` value passed in `data` to base64. // Please note: base64 encoding returns a `string` that is ~ 4/3 larger than the input. // Please note: If you need to encode many strings repeatedly, take a look at `encode_in_buffer`. -// Example: assert base64.encode('V in base 64') == 'ViBpbiBiYXNlIDY0' +// Example: assert base64.encode('V in base 64'.bytes()) == 'ViBpbiBiYXNlIDY0' pub fn encode(data []u8) string { return alloc_and_encode(data.data, data.len) }