Questions tagged as 'string'

3
answers

How to remove accented expressions with regular expressions in Python?

I'm developing a regular expression to try to replace accents and characters with ç by normal characters Example: á = a ç = c é = e But my regex is only eliminating, any tips? import re string_velha = ("Olá você está ???? ") st...
asked by 21.09.2018 / 19:40
2
answers

Change string to uppercase and remove whitespace

I'm trying to make a program in Python 3 that should turn typed text into uppercase and remove white space. I would like to know what is wrong with my code since it is not deleting the blanks. I tested two codes. First code: print ("-"*50...
asked by 31.10.2018 / 12:02
1
answer

How to print a hexadecimal value in uppercase?

I made a program in C ++ that reads a number and prints it in hexadecimal, follow the code below. #include <iostream> using namespace std; int main(void) { int n; cin>>n; cout<<hex<<n<<endl;...
asked by 30.07.2018 / 17:39
2
answers

How to make code that uses string properties readable?

I have a string that uses parts of another String, how to make this code "cleaner"? Since it is very difficult to understand. String sessionHash = dirPath.substring(dirPath.substring(0, dirPath.length() - 1).lastIndexOf("/"));    sessionHas...
asked by 17.03.2015 / 19:48
2
answers

Get content inside string

I will have a list of string in the following format: PERSON NAME ( LOGIN ), / p> So, I would need to get only what would be within the parentheses, ie zackson.morgan . How to do this?     
asked by 14.03.2015 / 02:57
3
answers

Integer for String

In QT Creator 5, how do I convert Integer to string? In Visual Studio 2012 there was the command: std::to_string(10); But it does not work on QT. I tried: #include <QCoreApplication> #include <iostream> #include <string>...
asked by 24.12.2014 / 14:26
2
answers

Creating string in PHP

Is it possible to create in PHP a variable of type string that contains so many bytes , that is, defined by the programmer? Example in C: char string[20]; In this case, string will always have 20 bytes, regardless of what is stor...
asked by 29.07.2015 / 14:34
2
answers

Split Column into Other Two Lat Long

I have the following spreadsheets: BIRDS.GENERO SP1 SP2 XLOCAL Thamnomanes caesius glaucus 0°32'S52°12'W Thamnomanes ardesiacus obidensis 0°10'S51°50'W Tham...
asked by 28.11.2018 / 17:15
3
answers

Remove 2 specific characters from a String

Good afternoon! Devs, I can not solve the following problem: In a calculator app, the calculations always return a Double, which automatically inserts a decimal even if it is to deploy zero, and to show in the editText would like to remove the "...
asked by 27.11.2018 / 21:26
2
answers

Returning direct and array function string

What works: void *teste(); int main () { printf("\nRESULTADO: %s\n", teste()); return 0; } void *teste(){ return "Ponteiro"; } What goes wrong: void *teste(); int main () { printf("\nRESULTADO: %s\n", teste()); retu...
asked by 03.11.2017 / 15:11