Category "string"

How to use .map to get sting from array

This is my first question because I'm just new to coding. I want to use .map to get strings from an array. let root_vegetables = ['potato', 'taro', 'sweet p

Automata and Strings

Can anyone help me with this exercise ? L = {w | w ends with a and does not contain bb} I do not know what I am doing wrong... I have tried creating a automato

Python - find pattern in file in max 4 lines of code

i have the following task. I have to find a specific pattern(word) in my file.txt(is a song centered on page) and to print out the row number + the row which ha

Python assigning the string to the variable - Str object is not callable message

I have the following problem where roles = models.StringField def role(player): if player.rank == 1: return 'leader' else: return 'memb

Remove pattern that occurs outside of words

I am trying to remove pattern 'SO' from the end of a character vector. The issue I run into with the below code is that it will remove any sequence of 'SO' case

What's wrong in my MIPS code about merge all separate input into a string?

.data string: .space 256 temp: .space 4 .text la $t0, string input: li $v0, 8 la $a0, temp li $a1, 4

Checking for Whether Both Expression Strings Contain the Variable

I had made a fully functioning method that would grab a variable string like x or var for the equation as so: // Equation Variable Getter public String getV

c++ find similar string in map/vector

Is there a c ++ function that finds all string occurrences above the map / vector that differ by max in 1 (generally n) character? Possibly some procedure that

Why the result of Exists function use == and != is not opposite? [closed]

string input = "1234"; string[] array = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; bool in_N1 = Array.Exists(array, x => x == i

Find the length of an array / comma separated string values in Quicksight Calculated Field

I have a column of sent_to_emails in my Quicksight Dataset. I want to calculate the number of values in this comma separated string i.e. split the string based

How to convert an ArrayList<Integer> to ArrayList<String>? [closed]

I have to convert an Int arraylist to String Arraylist so JText in swing can print the numbers of the String ArrayList. private static ArrayLi

R Count Frequency of Custom Dictionary in a Dataframe Column but Group them

I have a task, which is too complex for my R-knowledge. I have a dataframe with Tweets-data, including a column that consists of the usernames, data of the Twee

How to convert bytes represented as a string to the real bytes

Suppose we have a string that looks like this: fake_bytes = "b'This is a check - \xe2\x9c\x94\xef\xb8\x8f'" So this fake_bytes string is a text that is encoded

Snowflake CONCAT strings with DISTINCT values

I am doing a merge where a string exists in my target table. To this I want to concat a new delta value which is a ; separated string list in my WHEN MATCHED ..

How to count the amount of substring occurences? [duplicate]

How do I count the amount of times a substring appears in a string? So far I have static boolean doesAppear(String a, String b){ boolean a

What are the practical uses for strings?

I have been following some Fortran tutorials online and have recently come across strings. I was just wondering... what are the practical uses of them? It's pro

String Pattern Matching in C

I was trying this pattern matching method in C but whenever I give all the input, the vscode terminal waits for a while and just stops the program without any w

How can I multyply spaces and repair my code in haskell?

Specify the function that appends a text to a given length by appending a sufficient amount of space to the beginning of the text! If the text is not shorter th

Add a "i" variable to a variable name C# [duplicate]

I have a cube1, cube2, cube3 etc... variables and i want to use something like that: for (int i = 1; i < 100; i++) { Location "cube + i

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()