Skip to content

glennin-codes/Practice-Rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Problem Solutions

Welcome to the Rust Problem Solutions repository! Here, you can find solutions to various Rust programming problems.

Problems

  1. Problem 1: Find the First Word in a String Slice - This solution prints out the first word in a string slice.

    This problem is commonly encountered in text processing tasks.

    Solution Explanation:

    • This solution defines a function first_word that takes a reference to a string (&String) and returns a reference to a slice of bytes (&[u8]) representing the first word in the string.
    • This solution utilizes the FromUtf8 trait, slice, bytes and match Result to achieve the desired functionality.

2 .

How to Use

Each file contains a Rust solution to a specific problem. You can click on the links above to view the solutions.

Contributing

If you'd like to contribute your own solutions or improve existing ones, feel free to open a pull request!

License

This repository is licensed under the MIT License.

About

Dummy repo some random rust problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages