Author: Olayemi Michael

Convert a String to int in Rust

1. Overview Converting a string to an integer type is a common task in Rust, especially when working with user input which is primarily text-based. In this tutorial, we’ll learn how to safely and...

How to Concatenate Vectors in Rust

1. Overview Vector (Vec<T>) is a collection in Rust that allows storing multiple values of the same type in a single data structure. Unlike an array, Vectors can grow or shrink in size. In...

How to Split a String in Rust

1. Overview In this short tutorial, we’ll discuss how to split a string into two parts using Rust. 2. Using split_at() split_at() method is part of the Rust standard library, it provides easy functionality to...

Iterating Through Enum Values in Rust

1. Overview Iterating through an Enum value may be tricky in Rust. However, a third-party crate called strum makes the process easier. In this tutorial, we’ll explore how to use strum to iterate over an...

Difference Between Malloc and Calloc in C

1. Overview To allocate memory dynamically in C, we use functions like malloc() and calloc(). Both allocate memory on the heap, but have different initialization behavior. Common use cases of memory allocation in C...

Building Multiple Binaries in Rust

1. Overview In Rust, a binary is an executable file that serves as an entry point to a program. By default, a typical Rust project consists of a single binary. However, with some configurations,...