Questions tagged as 'string'

1
answer

Separate a single string into an array of strings [duplicate]

In this code I'm trying to make a string read and then put each space-separated word in an array of strings. I saw that in some cases the strtok function is used, but since I intend to use these strings for other functions, I do not know how t...
asked by 19.09.2018 / 22:39
3
answers

How would regex look to handle this case? [closed]

I can not separate words like this: In case I have CPFConsole , I wanted to separate to CPF and console. The code I have separates like this:   ([A-Z][a-z]+)|([a-z]{0,})|([A-Z]{2,}) But this code separates this way: CPFC...
asked by 06.12.2016 / 21:13
3
answers

Count how many times each character appears in a string (without using a function)

I have the doubt in a question of string exercises that I am doing. The question is this below:    Write a program that reads a string and prints how many times each   character       appears in this string       1st string: TTAAC      ...
asked by 26.03.2018 / 06:02
1
answer

Add numbers of several Strings in PHP

How do I add the numbers of several Strings in PHP, for example: string(2) "66" string(1) "5" I want to get the result of 66 + 5 = 71.     
asked by 09.09.2018 / 14:31
1
answer

Compare string [] with string [closed]

I tried this way: IWebElement descriptionTextXPath = driver.FindElement(By.XPath("html/body/div[1]/div[1]/div[2]/div/ng-include[1]/section/ul/li[1]/div/div/article/h4")); String h4 = descriptionTextXPath.Text; Assert.Ar...
asked by 10.09.2015 / 13:15
2
answers

Extract values from a string in javascript [duplicate]

I have a page that displays information through AJAX . Each time I do a search, I have the search value and page in URL , as follows:    / Material / Index ?? wordChave ?? numPage I can get these values through .split("??...
asked by 16.01.2017 / 14:27
2
answers

Recursively print subtrings

I need to print the substrings of a string, for example: OPEN, the substrings are OPEN, ABRI, ABR, AB, A. How do I do this? Because I can only print the entire string. #include <stdio.h> #include <stdlib.h> #include <string.h>...
asked by 10.06.2018 / 22:40
1
answer

Limit a specific value to a string

I need to limit to a specific value that would be 511 char command[512]; I tried with char command[512]; scanf("%511s",command); if (StrToInt(command))>511) printf("FIX ATK"); and this too char command[512]; scanf("%511s", comma...
asked by 12.12.2017 / 14:59
2
answers

Read an excerpt from a String

As you have seen my question above, I want to get only one part that interests me from a String, for example, I have a String preco whose text is R$ 20,00 , how do I get only the number? Another question is that if I try to add a se...
asked by 03.04.2016 / 02:09
1
answer

main (String []) exceeds limit 65535 bytes

Hello. I need to run the code below with values that exceed those allowed by the String of main, what do I do? This is a list of numbers that exceeds 65535 characters. Actually the program will be used for several sets, so the "a" is in...
asked by 16.04.2018 / 01:58