chevron_left

Recent posts tagged character

9 0 1 min.
Introduction number of occurrences: Today we are going to discuss count the number of occurrences of a character in a string in python. Friends, you know about Python, it is also called snake language, its syntax or code is as long as a snake. Num...
posted 5 days ago Tania 937 points
11 0 1 min.
**ASCII** stands for **American Standard Code for Information Interchange**. It is a standard data-transmission code used by smaller and less-powerful computers to represent both textual data (letters, numbers, and punctuation marks) and noninput-de...
posted Sep 10 Hafsa_Rao 355 points
13 0 1 min.
Let us understand the given scenario statement, Given a string, return a string where for every character in the original string there are two characters. It means the resultant string should have two characters/double of each character as ...
posted Sep 3 DivyaN 345 points
12 0 2 min.
Have you ever wondered how does the computer understands what key we have pressed on the keyboard? The computer cannot understand the human language i.e. English or any other language. It just understands the numerical language, so every character on...
posted Aug 19 Hafsa_Rao 355 points
12 0 2 min.
Sometimes, we come across a situation where we need to replace one or more characters in a given string. Replacing a character in a string using Python is as simple as it is in any other programming language. Python provides a built-in function to do...
posted Aug 16 Hafsa_Rao 355 points
6 0 3 min.
Searching a character in the String indexOf(char c) : It searches the index of specified character within a given string. It starts searching from beginning to the end of the string (from left to right) and returns the corresponding index if fou...
posted Aug 11 SharadMagar450 320 points
3 0 2 min.
In this article, we are going to see how to remove all the occurrences of a given character from a given string in C++. For doing this, we will use the erase() and remove() methods of Standard Library. So, let’s first discuss these methods.erase():Th...
posted Aug 9 Hafsa_Rao 355 points
0 0 2 min.
**Characters:** In Java, keyword *char* is used to represent characters. Unlike other programming languages like C/C++ , Java's char type is 16 bit. It ranges from 0 to 65,536 and no negative values. A literal character is represented within in sing...
posted Aug 8 DivyaN 345 points
18 1 1 min.
In java, string is a sequence of characters within Unicode representations. Hence Unicode definitions are includes both alphabetic and non-alphabetic characters. So if we have purpose of data validation, then sometime we have to remove non-alphabetic...
posted Jul 12 mhfaisal 275 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 120 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 275 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 355 points
9 0 2 min.
**What is String in Java?** ----------------------- In general, String is a sequence of characters. In Java, however, the string represents the sequence of letters. The Java.lang.String section is used to build the thread. Scrolling through a Strin...
posted Jul 2 amna 2,504 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 275 points
2 0 1 min.
How to return a character array from a function in cA character array is a sequence of characters, just as a numeric array is a sequence of numbers. A typical use is to store short pieces of text as character vector...
posted Jun 22 Sanjana Sagar 399 points
27 1 1 min.
In this program, we need to find the duplicate characters in the string.To find the duplicate character from the string, we count the occurrence of each character in the string. If count is greater than 1, it implies that a character has a duplicate ...
posted Jun 10 Jeevani 120 points
41 4 1 min.
Here I’ll explain java program to count the letters, spaces, numbers and other characters of an input string. Program:- import java.util.*; public class CountAll { public static void main(String[] args) { Scanner myObj = new Scanner(System.in...
posted Jun 7 Jeevani 120 points
30 3 1 min.
In Python, the collections module used as container datatypes. By providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple, it implements specialized container datatypes. This module has a dict sub...
posted Jun 5 mhfaisal 275 points
27 0 1 min.
Here, we will see the simplest solution for finding a specific character in a string in java. We will be using the String built-in function to execute this program:Algorithm:Take input string from the user.Take the input character you want to se...
posted May 31 Being human 57 points
8 0 2 min.
Difference between character array and string in c A major difference is: string will have static storage duration, whereas as a character array will not, unless it is explicitly specified by using the static keyword. Actually, a string is a cha...
posted May 28 Sanjana Sagar 399 points