• Register

Recent posts tagged string

0 0 2 min.
There are so many solutions to this problem. You can check this by using the regular expressions or the ASCII codes but the simplest yet easiest way to do this is by using isLetter() and isDigit() methods in Java.isLetter():This method is defined in ...
posted 4 hours ago Hafsa_Rao 28,538 points
0 0 2 min.
This is my way.See comments in code.#include <iostream> #include <string> #include <vector> #include <algorithm> using std::cout; using std::cin; using std::endl; using std::string; using std::vector; using std::istringstream...
posted 1 day ago raven 160 points
0 0 2 min.
This article will explain of how to split a string in C++.   The find and erase functions are built-in members of the std::string class, and they can be combined to split the text into tokens delimited by the given characters. This method c...
posted 1 day ago raven 160 points
9 0 2 min.
It finds the first character in the string s1 that matches any character specified in s2 (It excludes terminating null-characters). Syntax : char *strpbrk(const char *s1, const char *s2) Parameters :s1 : string to be scanned.s2 : strin...
posted 1 day ago Yogesh Sharma 247 points
4 0 1 min.
Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special character ‘\0’. Declaration of strings: Declaring a string is as simple as declaring...
posted 1 day ago Yogesh Sharma 247 points
12 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 2 days ago Tania 800 points
12 1 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 2 days ago Hafsa_Rao 28,538 points
16 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 2 days ago amna 113,234 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,538 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 886 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,538 points