Questions tagged as 'string'

2
answers

Remove punctuation and symbols in Python

I'm trying to remove punctuation symbols and other symbols (characters like copyright, for example) from a string. I want to leave the accented characters, the hyphen, the apostrophe ('), the white space, in addition to the letters and number...
asked by 18.04.2016 / 21:40
1
answer

Error while reassembling a string. Size is out

I can not complete this list, as it is: foreach (var item in text) { string[] linha = item.Split('\n'); foreach (var i in linha) { string nova_string = i.Substring...
asked by 01.03.2016 / 18:24
1
answer

Why does this seemingly simple implementation of strupr not work?

Error implementation in GCC: char* strupr( char *str ) { while(*str) { *str++ = toupper(*str); } } Note that str is used twice in assignment .     
asked by 02.04.2016 / 14:06
1
answer

Problems checking empty ()

I'm having problems checking a string using EMPTY (), it's the following .. If I play space on it, it "" is no longer empty .. and ends up inserting in the database the empty value, how can I solve this, what function ?     
asked by 06.06.2014 / 00:31
2
answers

How to put an integer at the end of a string?

I need to loop through n by putting an integer at the end of a string. Ex: string "E0" and an integer from 0 to n , something like this:    E00, E02, E03, ..., E0n char ent[3] = {'E','0'}; char a[1]; int n=5;//exempl...
asked by 18.11.2018 / 23:44
1
answer

Array of strings and pointers

Read the comments in the code #include <stdio.h> int main(void) { char *nomes[2][2]; //Eu não entendo porque se eu tirar esse ponteiro * o codigo dá erro nomes[0][0]="Misael"; nomes[0][1]="Zaes"; nomes[1][0]="Joao"; nomes[...
asked by 11.08.2018 / 20:06
1
answer

Problem dividing a string vector in C

I'm doing a program that needs you to find half a string vector, but that half can not cut any words, so that half would have to be the next space found after half. Soon after finding this half the program must divide the vector into 2 string ve...
asked by 02.07.2018 / 15:02
1
answer

Put string in an array of characters

I am learning character array and wanted to do a simple program in which I create a 200x100 character array, put a string at position 0 and print it out. This is part of a larger program I'm doing, but I need to understand how to insert a...
asked by 18.06.2018 / 19:44
2
answers

Item within comment in PHP

Ifthe"@return string" within a PHP file's encoding is deleted, will the coding undergo significant changes? Can I delete all comments including "@return string"? And finally, why did it look a different color?     
asked by 17.06.2018 / 23:40
1
answer

php method that checks two strings in a variable

Does anyone know of any method in PHP that equals the value of a variable with string ? I need to refactor the following code: public function hasPlan() : bool { return $this->reference === 'unico' || $this->reference === 'simult...
asked by 25.06.2018 / 15:36