Questions tagged as 'string'

2
answers

Error converting String to Numbers in Java

In my last post ( do / while double-repeat the expression ) had an overlapping input problem using the Scanner class, and according to the links placed in the response, we can not use nextLine () after nextInt (). Now I'm doing another algori...
asked by 18.01.2018 / 00:19
1
answer

Formatting a PHP string in UTF8

I have the following content in a $ description variable: Iwouldlikethewords"metallic" "plastic" "dimensions" to be normal. What should I use?     
asked by 28.11.2017 / 14:29
1
answer

Is it possible to define an HTML tag in a C # string? [closed]

I have the following string written in C #: string Descricao = "Você ficou muito tempo inativo, e por isso sua sessão caiu. Retorne para a página inicial para continuar." I would like to put the% wrapper of the string inside an HTML tag, so...
asked by 31.10.2017 / 15:30
1
answer

How to transform into a lowercase a value of a struct?

The next function should turn variables into lowercase and then compare them. I've tried converting before, but also bugou . Arithmetic use of pointers next to variables of struct . Pointer points to struct . How to fix the error...
asked by 02.11.2017 / 04:01
1
answer

Converting int to string

I made a program that simulates a login and when I convert the password that is in int to a string using sprintf it's from the failed segmentation, I tried to use the itoa but it's the error definition #include <stdio.h> #include <std...
asked by 04.12.2017 / 20:35
1
answer

remove parts of a string and return parts removed - Swift

How do I remove parts of a string and return those removed parts to another string in Swift? Example: var myString = "10setembro2017" let newString = myString.removeAndReturn(index:1..2) print(myString) //setembro2017 print(newString) //10...
asked by 18.10.2017 / 23:12
1
answer

Problem with accented text JSON - Android + Retrofit

I'm consuming data from a webservice that returns a list with JSON objects, like this: [{"idPDV":3062,"nomeFantasia":"SEBASTIÃO JOSÉ DOS SANTOS","endereco":"RUA MANCHE CATAN DAVID, 130","bairro":"VIDA NOVA","CEP":"79017164","latitude":"-20.38...
asked by 27.09.2017 / 19:46
1
answer

How do I create a variable of type char with an indeterminate size [duplicate]

How do I create a variable of type char * (to store a name) with an indeterminate size? Example: char nome[30] = { 0 } // 30 é o valor máximo e no caso se a pessoa tiver um nome grande? que ultrapasse 30? cout << "Informe seu nome c...
asked by 15.10.2017 / 14:37
1
answer

How to print a string from a string vector in C?

I have a string vector ( palavras[x][y] ) , I can read every word that will be an element of the vector, but I can not print any of these stored words. printf("%s",palavras[a][b]), does not work. Here are my attempts: #inc...
asked by 04.10.2017 / 00:02
1
answer

Check if typed string is in e-mail format

Well, I need some help to check if the typed email ends in "@ usp.br". Here is the code I've tried: /* pega o tamanho total do email digitado */ int tamanho = strlen(email); /* a partir do tamanho do email, comece a contar nos ultimos 7 car...
asked by 03.09.2017 / 02:57