String

In this string tag page, we have listed all the articles of different languages that belong to the string.

Pythons find() Method: How to Search for Substrings within a String?

The find() method finds the specified word or substring into a string and returns the index of its first character. In case if it doesn’t find the substring then it returns -1

Check if String Ends with Specified Substring using endswith() Method in Python

The endswith() method checks if the string ends with a specified substring. The endswith() function has three parameters in which the first is mandatory and two are optional.

Convert Strings into Lowercase in Python

Python has two built-in methods that convert capitalized alphabetic letters into lower case which are casefold() and lower().

Convert First Character of String into Uppercase in Python

You can convert the first character into uppercase through capitalize() method.

How to Convert a String in Lowercase in Golang?

In golang, you can convert strings into lower case by using the ToLower() function from the string package. It accepts strings as an argument and converts into lower case.

How to Convert a String in Uppercase in Golang?

Golang provides a ToUpper() function that converts strings into uppercase.

How to Convert String into Integer in Python?

You can use Python’s built-in int() function to convert the string into an integer. It accepts two parameters which first is required and the second is optional.

How to Convert String into Integer in PHP?

A string value can be converted into an integer value through type casting or intval() function in PHP.

How to Convert Date String to Different Format in Python?

To convert a date string into a different format, first, you need to convert it into a datetime object through strptime() function.

How to Concatenate Strings and Variables in Python?

In python, the ‘+’ operator is used to concatenate two strings. Let’s Suppose, to concatenate “Hello” and “World”, you need to use the ‘+’ operator in between.