• Register

Recent posts tagged string

6 0 1 min.
Introduction Python programming language is now a very easy to learn programming language. Writing programs in this language is so much fun and it is easy to understand. It is very difficult to see our question today.  Sounds. But very easy...
posted 15 hours ago Tania 800 points
6 0 2 min.
The replace() and replaceAll() methods are used to replace a character/substring in a string with another character/string. These methods are defined in the String class and can only be used with String objects. In this article, we are going to ...
posted 16 hours ago Hafsa_Rao 28,528 points
10 0 7 min.
The toString () method in Java, as its name suggests, is used to convert any Java object to String (that is, to a text string). However, there are several things you have to keep in mind.What is ...
posted 1 day ago amna 113,233 points
26 1 2 min.
When we are learning programming, we come across many hands-on exercise problems given to us by our teachers. In this article, we are going to the solution to one of those exercises. In the solution, we will first hardcode the string and if it g...
posted Jul 17 Hafsa_Rao 28,528 points
12 0 3 min.
Hello reader, Welcome to my post :) In this post, we shall see how we can reverse a string in java without using the inbuilt reverse method. There are a number of ways by which a string can be reversed in java. As far as this post is concerned, we wo...
posted Jul 12 kesav.eee 275 points
16 1 6 min.
Hоw  tо  соmраre  string  in  С++Strings  in  С++  саn  be  соmраred  using  either  оf  the  fоllоwing  teсhniques:String  strсmр()  funсtiоnIn-built  соm...
posted Jul 11 sakshi 883 points
10 1 6 min.
 JavaScript to keep only first N characters in a stringToday's article is very important on how students count the first letters of a string in Java.Java provides many advanced features for specific non-literal string values, including conca...
posted Jul 11 Tania 800 points
8 1 1 min.
A series of numbers and letters that have no specific pattern is considered as a Random String. It also known as Random Character String. Basically It used to generate a unique set of strings with the pupose of data testing. In Python, random module ...
posted Jul 10 mhfaisal 415 points
13 2 1 min.
Here we learn, how to count the occurrences of the character in a string.function countString(str, letter) { var count = 0; // looping through the items for (var i = 0; i < str.length; i++) { // check if the character is...
posted Jul 10 Jeevani 300 points
15 1 1 min.
In Java, string is a reference type where char is a primitive type. Char holds a Unicode representation by allocating 2 byte memory space as a character where as a String holds a sequence of character with a dynamically allocated memory spaces. So it...
posted Jul 9 mhfaisal 415 points
12 1 1 min.
In C++, char data type represents a character and holds symbolic character as a form of ASCII value by allocating 1 byte of memory spaces. String is a reference data type which holds sequence of characters. It allocate dynamically the memory space de...
posted Jul 9 mhfaisal 415 points
20 2 1 min.
How to check if a string is empty javaYou can check if a string is empty java using the isEmpty() methodExample 1public class Main{ public static void main(String args[]){ //this is an empty string String string1=""; //this strin...
posted Jul 8 offonime 468 points
20 0 1 min.
  Java how to convert a string to an intWe can convert String to an int in java using Integer.parseInt() method.To convert String into Integer, we can use Integer.valueOf() method which returns instance of Integer class.Example 1  //Java ...
posted Jul 8 offonime 468 points
13 1 1 min.
Overview  Today we are going to talk about a very important topic, how to use the reverse function in Python. As you may have known by now that all the functions of Python are very simple.  Similarly, reverse also means to invert somet...
posted Jul 8 Tania 800 points
15 1 2 min.
While working as a programmer, we sometimes need to see whether some string contains certain characters or not. Especially when we have to search for something. In this post, we are going to see how we can check whether a string contains a certain ch...
posted Jul 4 Hafsa_Rao 28,528 points
12 0 1 min.
How to add a character to a string java// How to add a character to a string java // we will do this without using methods import java.lang.*; class AddString { // Function to add a character to a string java public static String add...
posted Jul 4 offonime 468 points
18 0 3 min.
In C ++ language, after reading strings, there are problems to read numbers, because our program does not identify that they are integers and therefore operations cannot be performed.To solve this it is necessary to convert our string to an integer.#...
posted Jul 3 amna 113,233 points
6 0 1 min.
Here, we learn how to convert string array to integer array in java.If you want to convert a string to integer array then you can use one of the 2 methods.Using Integer.parseInt() methodUsing Integer.valueOf() methodMethod 1: Using Integer....
posted Jun 30 Jeevani 300 points
3 0 1 min.
In C, string is a derived type from the array character. So taht a string can holds a sequence of char typed characters. In a string any character may be occurs multiple time. Our task is that find the count of occurrence for a given character i...
posted Jun 30 mhfaisal 415 points
2 0 1 min.
A string in Python is a series sequence of characters. It is a derived datatype. Strings are immutable so that after defined once, they can't be changed. Many Python methods, which includes replace() , join() , or split() adjust strings.Counting ...
posted Jun 30 mhfaisal 415 points