Questions tagged as 'string'

1
answer

What is the difference between the operators "+" and "&" when in string concatenation?

In VB.NET, there are two operators that I use in the concatenation of strings , the & and the
asked by 22.09.2016 / 00:37
1
answer

String reading problem

I am making an algorithm that gets cases , then a name with surname , a and a size . It should make a comparison and print them sorted by color in ascending order, in descending order and the names in ascending order . This par...
asked by 13.06.2015 / 15:56
1
answer

How to format a String with other elements using format ()

I would like to know how to format a String 08041995 on 04/08/1995 using the format () method in Java PrintStream ps = new PrintStream(arq); String valor = "250,35"; ps.format("R$ "+"%s", valor); ps.flush(); I was able to in...
asked by 30.10.2015 / 21:33
1
answer

When to choose between using a wide string or not?

When using wide ( std::wstring ) or a normal string ( std::string )?     
asked by 31.12.2017 / 11:30
1
answer

Use of bitmap font in Haxeflixel

I'm working on a game using the framework Haxeflixel 2D and I'm having some difficulties using bitmap fonts to render accented characters. But to make it easier I'll split the question into two parts, basically what I did and what the problem...
asked by 23.12.2014 / 23:36
1
answer

Convert $ scope to string in ng-model by AngularJS

I am in doubt, according to the Angular tutorial ng-model only accepts a $scope if it is string , giving: Error: [ngModel:numfmt] expected '1234' to be a number Possible to convert to string ? Edit: HTML code: <div moda...
asked by 07.12.2015 / 02:38
2
answers

What is the difference between the string.slice () method and the string.substring () method?

We know that the string.slice() method and the string.substring() method allow you to extract a part of a string and create a new string as a result (without modifying the original string). What differentiates one method from the o...
asked by 19.11.2018 / 22:55
1
answer

How to calculate percent difference (or similarity) between two strings?

I'm using PHP in an application I'm developing, where I have a text editor. In this text editor, with each change made, before saving, I create a record with the original data (that is, how they are before the change is complete). In addit...
asked by 29.06.2018 / 16:48
1
answer

Is it possible to change a String of a method at run time?

If I have a fixed String within a method can it be altered using reflection or something like that? Example: public static void main(String[] args) { String nome = getName(); boolean valid = isValidName(nome); if (valid) {...
asked by 20.08.2018 / 17:53
2
answers

How to count the frequency of each letter in a string?

I need to count the relative frequency of each letter in a string (letters only), without considering spaces, not case-sensitive and without differentiating accented letters. I was able to create a code that does more or less that, but the progr...
asked by 29.11.2014 / 01:38