Questions tagged as 'string'

1
answer

How to get a value using interpolation?

I'm trying to retrieve a value from a class by using tweening. Using Console.WriteLine($"Meu Nome é, {pessoa.Nome}"); , I get the value of the form I want, but in my case the string will come from a database configuration. I t...
asked by 12.07.2018 / 13:51
2
answers

Method split and rsplit, python

I made this little program to try to simulate the methods 'split' and 'rsplit' of Python , but when I run it it does not print the last sentence of the string. For example, if in the string I type 'pao ou açucar ou café'...
asked by 15.09.2018 / 18:39
1
answer

How to use strings as parameters in R

Galera, I need to create a column using a string and use other column strings as arguments, for example: dataframe <- dataframe %>% mutate("Newstring" = case_when("stringA" < 65 & stringB == 0 ~ 1, TRUE ~ 0)) I believe parsi...
asked by 26.05.2018 / 18:36
1
answer

Txt file manipulation in JAVA

Hello, I'm a beginner in java and I need to create a program that creates a txt file with a pre defined content, read it and divide the contents of this file into two different txt files. start with // (java comments) and pass the rest (it will...
asked by 20.04.2018 / 21:59
1
answer

How to detect line break in Python input?

I need to read test cases in the following format: 3 1 2 3 4 52 2 1 87 10 51 32 1 36 21 34 32 12 34 45 200 (... 200 numeros separados por espaço) and so on, where the first number indicates the number of numbers to come later. Each line is...
asked by 29.09.2018 / 19:05
1
answer

Why add a variable, property, method, etc. in a string does it work?

When I add a variable, property, method, enumerator, etc. in a string , it works, even though I do not call the ToString() method for example. Example with type and integer: var example = typeof(bool); var exampleInteger = 12; Con...
asked by 13.02.2018 / 19:49
1
answer

Plain text editor in C

I have the following proposed exercise:    Make a program that mimics a text editor. Initially you will read the data entered by the user (lines of text) and create a vector in memory where the texts provided by the user will be stored (text...
asked by 12.06.2018 / 04:41
3
answers

Rotate text and replace first link

I have a variable named $text where it stores texts that the user writes.    '$ text="Hahahha that cool this site, I was able to answer all my   questions there link " ' What do I need? I have a function named makelink ($ url...
asked by 30.06.2014 / 16:12
1
answer

Change Javascript string characters to successors

I have a string, for example, acbd and I want to get another string bdce , formed by the successors of each character. In my searches, find a possible way to transform the string into an array and then iterate it to get a new string....
asked by 05.01.2018 / 19:43
1
answer

How to delete characters from a string inside a Python array

I'm starting in python and I've decided to fiddle with .txt files. I did the following procedure to insert values into an array, and from that insert each value into a line of a filename.txt file. def insertFile(): vet = []...
asked by 26.10.2017 / 18:38