]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: str: add radix prefixed integer parsing functions
authorAndreas Hindborg <a.hindborg@kernel.org>
Wed, 24 Sep 2025 12:39:25 +0000 (14:39 +0200)
committerDaniel Gomez <da.gomez@kernel.org>
Mon, 3 Nov 2025 13:40:45 +0000 (14:40 +0100)
commit51d9ee90ea9060be240830eb28f5f117ad00318c
tree4df0d25a2b16c2b716dd830d79c1cdac5b9d104e
parent821fe7bf16c57d690f4f92997f4e51abb93e0347
rust: str: add radix prefixed integer parsing functions

Add the trait `ParseInt` for parsing string representations of integers
where the string representations are optionally prefixed by a radix
specifier. Implement the trait for the primitive integer types.

Suggested-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: Daniel Gomez <da.gomez@kernel.org>
rust/kernel/str.rs
rust/kernel/str/parse_int.rs [new file with mode: 0644]