Questions tagged as 'string'

2
answers

Improve code performance in C #

I'm doing some testing with some C # code and during an analysis I realized that some high peaking problems happen when whole-valued conversions to string occur, in most cases the conversion happens like this: classe.valor.ToString("0.0")...
asked by 31.07.2015 / 16:57
2
answers

What is the rule to convert a binary value to a negative number and vice versa?

I was left with a doubt after @bigown answered this question: What is the ~ (useful) operator used in PHP ? How can I get the negative value in binary? And how, through the binary, reach a negative value? In @bigown's response, he...
asked by 05.08.2015 / 18:35
3
answers

How to check if String is null or blank in Java / Android

I went through this problem by implementing a simple database query library sqlite in android and would like to share the solution with community, I think it's useful as I've thought through until I find a simple solution.    In the imple...
asked by 27.03.2014 / 01:06
2
answers

Is there any more optimized way to "multiply" a string without using repetition?

I'm creating an algorithm in JavaScript, and I'm already finding it too cumbersome. Now I need a string "multiplied" N times. I would like to know if it is possible to do this without using a retry. For example, for the algorithm to return "w...
asked by 08.06.2018 / 02:24
2
answers

Regex in dynamic string of X characters, in dynamic content

Next, I have a page that generates content scrambled with dynamic and non-dynamic strings, I need to get a dynamic value between the | tabs, it contains random data / strings that change when loading the page. The variable I want to get h...
asked by 13.06.2015 / 07:44
1
answer

I want to check if the string contains only letters?

#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define tam 50 main(){ struct cadastro{ char nome[tam]; }; struct cadastro dados; printf("Nome:"); fgets(dados.nome,ta...
asked by 02.04.2018 / 04:14
1
answer

Transform list of strings into list of tuples

I have this: l=['Car 8', 'Bike 5', 'Train 10'] And I would like to have something like this: [('Car','8'), ('Bike','5'), ('Train','10')] How could you make a list of strings into something like a list of strings tuples?     
asked by 05.12.2017 / 01:27
2
answers

What's the difference between creating a string with quotation marks and brackets?

I always created the strings with the quotation marks, like this: local minhaString = "Eu sou uma string" I downloaded a source to give a studied language and I came across the following way to create a string : local query = [[ SELE...
asked by 20.12.2017 / 01:35
2
answers

How to change the value of a property given its name

In my program I have some classes where data is stored. For example Class1.alfa.dado = 66; Class1.beta.dado = 56; Class1.gama.dado = 37; The user will select one of the options that you want to change in a ComboBox, in this ComboBox are the...
asked by 18.08.2014 / 14:38
2
answers

Maximum number of characters in a String and StringBuffer in Java

What is the maximum character limit that String and StringBuffer types support in Java?     
asked by 02.10.2014 / 18:28