Questions tagged as 'string'

1
answer

Splitting string in C

I'm very new to C, but I have a lot of experience with python, I have a project that I need to get 3 numbers on the same line and make a vector with these 3 numbers in the input digit 3 1 37 I wanted you to form a vector [3,1,37] there...
asked by 04.10.2017 / 17:10
1
answer

Get part of a string with Regular Expression - C #

Based on the string "Plane Liberty Company +50 - 043-98965-2784 (058 / POS / SMP)", I need to get the part of "043-98965-2784". I noticed that in the txt file I'm using, the numbers follow the pattern "000-00000-0000". Could anyone help me...
asked by 31.10.2017 / 15:40
1
answer

Format string in PHP

I saw some examples here in StackOverflow , but I just could not. I need to format this string: 'personalization_id="v1_i8b1bAFy7m6K+j3TseNGDw=="' If I use a $cookie = explode('=', $cookie); it looks like this: 0 => string '...
asked by 23.10.2017 / 18:55
1
answer

Separate street address from a string

In my application JAVA , on a screen, I have fields related to the address, I have two ways to register this address, I can automatically pick up the zip code most of the information or put everything "manually" p> The problem is that ma...
asked by 27.04.2017 / 19:03
1
answer

Calculate occurrences in overlapping string

I would like to know how to make as many combinations of substrings as possible within a string, eg: string = 'abcdcdc' sub_string = 'cdc' The return value I want in this case is 2, because the code should be able to check how many co...
asked by 11.11.2017 / 16:34
2
answers

How to clear the vector name so that it does not stay with the rest of the previous strings

#include <iostream> #include <string.h> using namespace std; int main() { int condicao; cin >> condicao; //Determina o tamanho do vetor // while(condicao != 0){ char nome[100]; for(int iniciar =...
asked by 16.03.2017 / 02:52
1
answer

Find a numeric group in the string

Hello, I'd like some help finding a group of 20 numbers within a string that has characters and symbols. Let's say my string has 165 characters, I want the numbers 127 to 147 that are my group " 00001138271467122784", but the string size on the...
asked by 18.05.2017 / 22:34
1
answer

'Uninitialized variable' used in this function?

After compiling the program, you receive 2 warnings of the same type:    "warning: 'phrase is used uninitialized in this function" and    "warning: 'word' is used uninitialized in this function" #include<stdio.h> #include<s...
asked by 12.07.2017 / 02:16
2
answers

Replacing characters in a string

I have a string to be passed by the form and would like to replace some of its characters so that it is in numeral form: if(form1.autonomoBonusBruto.value.includes("R$")){ form1.autonomoBonusBruto.value.replace("R$","");...
asked by 15.12.2016 / 02:10
1
answer

The scanf writes string to a pointer that does not have a defined size?

I'm trying to understand how strings work in C. I noticed that even though I can not define any limit for the TextoUm[] (which follows in the code below) in any part of the code, % can write a string to that vector correctly. But the...
asked by 30.11.2016 / 23:24