Skip to content

str::byte_slice_no_callback includes the trailing NULL #7019

Closed
@SiegeLord

Description

@SiegeLord

rustc 0.6 (9873f67 2013-06-04 17:55:34 -0700)

E.g. this assertion fails:

fn main()
{
    use std::str;
    assert_eq!(str::byte_slice_no_callback("a").len(), 1);
}

Notably, str::byte_slice and str::to_bytes work as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions