Questions tagged as 'string'

1
answer

PHP: How to convert a number into a string? [duplicate]

I have an application that generates a PDF receipt. But in the bank the values have to be converted into words BD | PHP 10 | TEN 15 | QUINZE 7 | SEVEN Is there a function that returns the string of a number in php?     
asked by 07.11.2017 / 14:13
1
answer

Is there a difference between using backslash and simple?

I want to know when it comes to uploading a file, like this: $destino = 'imagens/' . $novoNome; Is there a difference between imagens/ and imagens\ ?     
asked by 11.09.2017 / 01:09
2
answers

Get content that is before the number using regex

$MinhaString = "Aventura, Fantasia, Ação 25 de maio a 31 de maio" I tried to do so, but it does not work. $Genero = strstr ($MinhaString,"/[^0-9]/",true); I just need the "Adventure, Fantasy, Action". The date is not static.     
asked by 26.05.2017 / 23:22
1
answer

What is the difference between "string" and "character" in Python?

What is the difference between string and character ? For example: print 'Olá, mundo!' print "Olá, mundo!" Being both in theory are the same, right? PS: I opened the XML to do my color editing, and in the Python XML comes a color...
asked by 24.08.2017 / 23:41
3
answers

Remove Accents and Transform Spaces in PHP Traces

I updated my PHP and my next Script which I used to transform text without accents, and the dashed spaces (-) no longer works in PHP because ereg_replace is obsolete. > <?php $variavel = "Céu Azul"; $variavel_limpa = strtolower( e...
asked by 14.04.2018 / 23:37
1
answer

Take numbers together with str_replace

I want to take a part of a string, specifically numbers next to the letter, such as: $string = "Parte da string - 60h" Well, I use str_replace as follows: $string = str_replace(' - ', '', $string); $string = str_replace('[ˆ0-99]h', '', $s...
asked by 13.04.2018 / 20:50
1
answer

How to remove a specific character from some specific strings inside a list in Python?

I have an example list: ['#[Header]', '#Application Name\tLCsolution', '#Version\t1.24'] I'd like to know how to remove a specific character, such as # of all elements in the list, or, if I prefer, only some elements, such as [0:1...
asked by 16.06.2018 / 20:32
1
answer

Can not convert from 'string' to 'System.IFormatProvider'

Follow the code (it works): var teste = 1; var teste1 = teste.ToString("000000"); Result:    000001 Here is another code (not working): var teste = "1"; var teste1 = teste.ToString("000000"); Result:    Can not convert from '...
asked by 26.04.2017 / 23:35
3
answers

Handle String in JAVA?

I have a query of SQL that the content brings me like this: [email protected];[email protected] I need only the first address, I have to disregard everything that is from ; ?     
asked by 03.04.2017 / 20:35
2
answers

How to get the length of a char array?

How do I get the size of a set of char ( char** )? The way I'm trying is always returning me the value 4. const char* opcSalgados[] = { "Pastel", "Mini pizza", "Coxinha", "Pao de queijo", "Pao de frango com queijo", "Pao de carne"...
asked by 14.12.2017 / 16:45