Questions tagged as 'string'

1
answer

Check string Regex C #

I have a string that can only be composed of X uppercase and - . Example: X-XX-XX or X-X-X-XX-XXX . Where every - would count one group and each X one digit. Example 1: The string X-XX-XX has 3 g...
asked by 20.12.2016 / 19:57
2
answers

Error: object of type 'float' has no len

I was debugging simple operations in the Python interpreter, and the following command made me curious: >>> b = 3.12; len(b) With the following error:    Traceback (most recent call last):       File "", line 1, in       Type...
asked by 05.01.2016 / 22:50
2
answers

How to generate the alphabet with white space between the letters?

In Haskell I can generate the alphabet as follows: alfabeto = ['a'..'z'] To display it simply: alfabeto "abcdefghijklmnopqrstuvwxyz" However, I'd like to know how I can put a space between the letters, like this: "a b c d e f g h .....
asked by 17.07.2018 / 16:35
2
answers

How do I delete a specific item from a ListView?

I would like to ask a question: I have a ListView , where your adapter is clarified in the same activity and the contents of adapter (the strings ) are in another class, in another package. How do I delete a specific item from Li...
asked by 21.05.2014 / 17:17
1
answer

String for Date

I'm creating some parsers and was doing tests to develop Date. This code: value = '2015-12-31 23:16:00' value = value.replace(/(\d{4}-\d{2}-\d{2}) ?(\d{2}:\d{2})?(:\d{2})?.*/, '$1T$2$3'); value = value.replace(/T$/, ''); value = valu...
asked by 01.07.2015 / 20:07
5
answers

Print string in reverse

Why can not I print this string in reverse? I know there is a possibility of using a simpler form, but I want to understand the error. static void Main(string[] args) { string frase = "Diego lima de Aquino"; for(int i = frase...
asked by 19.10.2016 / 15:37
5
answers

How to check if the string variable value is number?

I am developing a program where the user types a data, then I have to check if the value is number to proceed with the operation, but if it enters a non-numeric value it is alerted about the invalid value. > I tried to use the type() fu...
asked by 03.06.2017 / 21:07
5
answers

Digits in a java string

How do I find out how many digits a String has in Java? For example, user entered with "example123", the string has 3 digits. I am using this function but it is not working: private static int digitos(String text) { char[] digitos = ne...
asked by 24.05.2017 / 00:49
2
answers

Error replacing occurrence in string using replaceAll

I extract the text of several lines of a PDF, at the beginning of each line I have a configuration of the font size and family used in that line, but then I need to remove this information. First I made using replace , as follows: Str...
asked by 11.10.2015 / 03:53
4
answers

How can I replace String.isEmpty () in Java?

I have the following: data = new Json().execute(URL).get(); System.out.println(data); if (!data.isEmpty()) { //erro neste data.isEmpty I have an error:    has an error: Call requires API level 9 (current min is 8): java.lan...
asked by 13.07.2016 / 05:30