Category "string"

How do I compare strings in Java?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals()

How do I remove Japanese characters?

I have some data with Japanese characters from survey data. Some of the survey questions and answers (multiple choice) are given in both English and Japanese, e

Convert this String to a List in Python

I'm new to Python and I try to convert following txt to two lists, splitting Country from Capital. Afghanistan | Kabul Albania | Tirana Algeria | Algiers ... I

How can I create a 2D array of chars with POINTERS in C?

I'm trying to create a program which the user inputs the number of items (rows) and give each one of them a name (scanf) with the max of 30 characters. I want t

Scraping SofaScore votes using Xpath and google sheets

I'm trying to scrape the votes from SofaScore with google sheets using the importxml function. I'm running into an issue because the class name has a random str

Reverse each word with uppercase without changing word

How do I reverse each uppercase and lowercase ("I am A Great human") to ("I ma A Taerg namuh")? This is the code I Have: function wordsReverse(str) { let wo

is there away to get the elements out of strtok and restor them into another string to do operations on them?

this code is to take an equation from the user in the form of a string and then the program configures the confessions and store them in a dynamic array; now I

Recursion: Longest Palindrome Substring

This is a very common problem in which we would have to find the longest substring which is also a palindrome substring for the given input string. Now there ar

Does VSCode can escape text when pasting into a string literal?

Eclipse has an option that copy-paste of multi-line text into String literals will result in quoted newlines. Preferences > Java > Editor > Typing >

BigQuery standard SQL: how to group by an ARRAY field

My table has two columns, id and a. Column id contains a number, column a contains an array of strings. I want to count the number of unique id for a given arra

Problems with cout and a specific string length arithmatic operation c++

This is my first attempt at LCS. The problem I have is with the last portion. When the two input strings are 'mango' and 'man', it seems that cout keeps messing

Pandas - Duplicate Rows and Slice String

I'm trying to create duplicate rows during a dataframe on conditions. For example, I have this Dataframe. students = [ ("a", "Ursula"), ("b", "Hayfa, Ma

How to compress a C++ string using Zstd?

I'm very new to C++ and I wanted to compress a std:string object via Zstd compression library, but so far I couldn't find a C++ sample code for this purpose by

How can I reverse a single String in Java 8 using Lambda and Streams?

I have one string say "Aniruddh" and I want to reverse it using lambdas and streams in Java 8. How can I do it?

Reverse String characters in java

Am trying to reverse a string using a method in java, I can fetch all the elements of the string and print them out in order via a loop, my problem is reversing

Format currency in JavaScript removing .00

I am currently formatting numbers to display as currency values using the following code: return symbol + value.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,"

How to reverse a string that contains complicated emojis?

Input: Hello world👩‍🦰👩‍👩‍👦‍👦 Desired Output: 👩‍👩‍👦‍👦

Input: a2b3c4 and Output: aabbbcccc

The code I've written is not producing any output. It just takes the string as an input: #include<stdio.h> #include<conio.h> #include<string.h&g

How to check if a string is a substring of another even if not in order?

Is there a way to check if a string contains another string but not necessairely in the correct order : "hel my frend" in "hello my friend" = true "hel my fren

MATLAB: Subindexing in cell array based on results of strfind

I have a cell array, like so: ID = {'g283', 'sah378', '2938349dgdgf', 'g283'}; I also have some data that corresponds to these IDs. Data = {'data1', 'data2'