Akhil Sharma has Published 671 Articles

Golang program to check if a string is empty or null

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:15:03

12K+ Views

String in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type in Go, the string type can be used in a ... Read More

Golang program to find the frequency of character in a string

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:13:57

579 Views

String in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. The frequency of a character means the number of times a character is ... Read More

Golang program to iterate through each character of string

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:12:49

6K+ Views

A string in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type in Go, the string type can be used in ... Read More

Golang program to capitalize first character of each word in a string

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:11:55

4K+ Views

A string in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type in Go, the string type can be used in ... Read More

Golang program to clear the string buffer

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:07:48

841 Views

When a string buffer is cleared, all of the data that was previously stored inside the buffer is deleted. This can be done for a variety of reasons, including when you want to reuse the buffer for fresh data or when the data that is currently in the buffer is ... Read More

Golang program to check if a string contains a substring

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:06:02

407 Views

A substring is a small string in a string and string in Golang is a collection of characters. Since strings in Go are immutable, they cannot be modified after they have been produced. Concatenating or adding to an existing string, however, enables the creation of new strings. A built-in type ... Read More

Golang program to show data hiding in class

Akhil Sharma

Akhil Sharma

Updated on 01-Feb-2023 19:04:51

217 Views

In Golang, data hiding is a practice of preventing external code from accessing or changing a class’s members. This is accomplished by designating the class's members as private, which restricts access to or modification of them to the class's methods only. This is a crucial idea in object-oriented programming since ... Read More

Golang program to get maximum and minimum from a slice

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 15:00:51

4K+ Views

In this article, we will see how to fetch maximum and minimum elements from a slice. A slice is a sequence of elements just like an array. An array is a fixed sequence of elements whereas a slice is a dynamic array, meaning its value is not fixed and can ... Read More

Golang to check if a slice is empty

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:58:50

4K+ Views

In this article, we will check if the slice is empty or not using a variety of examples. A slice is a sequence of elements just like an array. An array is a fixed sequence of elements whereas a slice is a dynamic array, meaning its value is not fixed ... Read More

Golang program to check if two slices are equal

Akhil Sharma

Akhil Sharma

Updated on 23-Jan-2023 14:55:05

1K+ Views

In this article, we will see what are the ways to check whether two slices are equal or not with the help of relevant examples. A slice is a sequence of elements just like an array. An array is a fixed sequence of elements whereas a slice is a dynamic ... Read More

Advertisements