Questions tagged as 'string'

1
answer

How to extract space-separated words via Javascript

Continuing the marathon of articles regarding extraction of texts, I noticed that this type of question is very difficult to find next to a clear and direct answer. In order to take away my doubt and certainly the one of other users, today's...
asked by 14.05.2017 / 14:25
1
answer

Use of% in variables

I can not understand what this symbol is for in a variable, I see its use in some points in SQL code, Shell Script, C. What is the use? For example a use of this symbol in Shel Script: DATA=$(date +%H) The variable DATA receives t...
asked by 14.05.2017 / 18:54
1
answer

How to get the number of rows from a StringList and apply?

I have a StringList inside a mensagens.txt file, I would like to count how many rows have this StringList contained within that file. For each line of the string 1 code will be run in plugin code. If StringList...
asked by 08.02.2018 / 04:27
1
answer

toString returning Null when it should not

I have the class Aluno . public class Aluno { private String nome; @Override public String toString() { return this.nome; } //metodos getters e setters } Class Vetor public class Vetor { p...
asked by 13.07.2016 / 14:39
1
answer

How to read a variable in setText ()?

I need the text of a lineEdit to equal a string variable. I'm using this code: void MainWindow::on_pushButton_clicked(){ string texto; texto= "mensagem"; ui->lineEdit->setText(texto); }     
asked by 28.11.2015 / 23:46
1
answer

Clang presents character error too large but Visual Studio compiles normal

I'm having trouble understanding why clang presents the error message    character too large for enclosing character literal type when trying to run the code: char c = 'ç'; While Visual Studio 2015 compiles seamlessly. I know that di...
asked by 24.06.2016 / 23:08
2
answers

Read specific text inside a .txt in C #

I need to read a text file that contains several lines: 1 C0000000000 132008281 06140214 080515 0000000005990 00000000000000000000000000000000000599000000000000000...
asked by 29.05.2015 / 15:48
1
answer

Substring (string.IndexOf) is returning unwanted parts

I'm capturing a music site . I would like to return only 2 information artist and music. It is in this code snippet: <div class="nowOnAir"> <a href="http://www.radioitalia.it/artista/edoardo_bennato/1.php" onclick="javasc...
asked by 03.08.2015 / 03:51
1
answer

Replace backslashes with single bars - Image URL

I'm trying to remove the backslashes to open the URL of the image, I found a way to override, but part of my string was lost: function formatURL( $url ) { echo $url."<br />"; $url = str_replace('\', '/', $url); echo $ur...
asked by 27.01.2015 / 17:20
1
answer

I can not display the names of people over the age of 18

/*Escreva um programa que receba o nome, profissão e a idade de 10 pessoas, calcule e imprima a quantidade de pessoas maiores de idade (idade >= 18 anos) e seus respectivos nomes.*/ #include <iostream> #include <locale.h> #include...
asked by 31.10.2015 / 18:17