Skip to content

Commit 4eee6c8

Browse files
authored
Fix string length for multibyte characters (#4)
1 parent 59eaace commit 4eee6c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/discord_bot/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ async fn len(
363363
ctx: Context,
364364
message: &Message,
365365
) -> Result<(), crate::Error> {
366-
message.reply(ctx, args.len().to_string()).await?;
366+
message.reply(ctx, args.chars().count().to_string()).await?;
367367
Ok(())
368368
}
369369

0 commit comments

Comments
 (0)