add initial data

This commit is contained in:
timeshifter committed 2026-09-04 15:56:45 +02:00
1 parent 048a82b101
commit 51d935d06b
66 files changed
+1329

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "length-of-last-word"
version = "0.1.0"
+6
View File
@@ -0,0 +1,6 @@
[package]
name = "length-of-last-word"
version = "0.1.0"
edition = "2024"
[dependencies]
+7
View File
@@ -0,0 +1,7 @@
fn main() {
dbg!(length_of_last_word("Hello World".to_string()));
}
fn length_of_last_word(s: String) -> i32 {
s.split_whitespace().last().unwrap().len() as _
}