Questions tagged as 'string'

1
answer

Printing a sequence of 3-by-3 formatted numbers separated by dashes

Let's say I have the following String S = "00-44 48 5555 8361" entry and I need to return this 3-by-3 split string separated by "-" as follows:    Output: 004-448-555-583-61 The number of characters may vary. Below the following sc...
asked by 17.10.2018 / 04:26
1
answer

Problem with storing and printing strings in C

I'm picking up words from a text file, and at the time of printing they're all right except when I store them in a vector. If I store them in a vector, at the time of printing, some random characters come out before the words. void leArquivo(F...
asked by 17.11.2018 / 18:13
3
answers

Use string to reference variable

I want to pass to the function execSQL the name of the variable that I want to use in % with% and from string SQL, pass the variable directly to the base.consulta() function, ie pass the variable that has the same name as string...
asked by 31.07.2018 / 18:18
1
answer

Comparison in "if" does not fall where it should [duplicate]

What error in my code? For regardless of the answer, the result is else . #include <stdio.h> int main () { //variaveis char sigla[3]; //programa printf ("Entre com a sigla do seu estado:"); scanf ("%s", &am...
asked by 24.07.2018 / 01:17
1
answer

C # - Remove ASPAS - Replace - Remove ASP Double

I have a variable (TEXT) that is a string, where its value is: "06/22/2018 00:00:00" How to make a Replace by removing its quotation marks?     
asked by 22.06.2018 / 21:09
2
answers

Include quotation marks in String variable value

I would like to know how do I declare a String variable in which the value has quotation marks in Visual Basic .NET? For example: Public frase As String = "E ele disse: -"Olá a todos!"" Is there any escape expression for Visual Basic to...
asked by 01.06.2018 / 06:40
1
answer

Query string pagination with codeigniter

How can I do paging with query string in CodeIgniter? I'm trying to search the documentation but I have not found it! I have the following scenario: http://localhost/meusite/procurar/s?search_state=RJ&search_city=Rio+de+Janeiro If it wa...
asked by 08.05.2018 / 18:09
1
answer

Python - Complete list of each writer, along with the acronym of each person (first letter of name and surname)

Based on the list of writers described below, I have to manually create a list where each element is a list of two elements, name and nickname . Here's the list: escritores = [['Pedro', 'Tamen'], ['Almeida', 'Garrett'], ['Camilo', 'Pessa...
asked by 02.05.2018 / 15:21
1
answer

Python language format function in C #

int varvalor; int var01 = varvalor * 1; Console.Write("Digite um número para ser multiplicado: "); var01 = Convert.ToInt32 (Console.ReadLine()); Console.WriteLine(); I wanted to write in Console.WriteLine(); these lines of code that is...
asked by 13.02.2018 / 00:39
1
answer

Which string library can I use?

I'm refactoring a code that uses the eclipse plugin but I want to turn it into pure java. The idea is to turn the String into something with this style: Person@182f0db [ name=John Doe age=33 smoker=false ] The current code is using...
asked by 01.03.2018 / 17:44