Questions tagged as 'string'

1
answer

Problem with a string attribute of an object

Hello! I'm having a problem with a string member of my object. When I do the assignment object.word="some word", the program even compiles and runs, but when I print the content, totally different symbols appear. Here is the code main: #...
asked by 13.08.2018 / 13:33
0
answers

Literal strings Crown Moon

I'm kind of lost with \t . In the console, it works and in the simulator it is ignored. If anyone knows of a possible solution. local myText = display.newText("a\tb", 200, 100, native.systemFont, 16) print(myText.text) Or: a = "oi"...
asked by 30.03.2018 / 01:45
5
answers

What is the difference between string vs string?

I'd like to know what the actual difference is between String (upper case s) and string (lowercase s). Apparently the two have the same goals, but which one is "better" to use?     
asked by 01.02.2014 / 11:31
4
answers

How to compare Strings in Java?

The == operator says that the Strings are different, and they store the same literal value, see example: public class TesteString { public static void main(String[] args) { String str1 = "teste"; String str2 = "Otes...
asked by 03.02.2014 / 16:19
0
answers

TypeError: not all arguments converted during string formatting - Python 3.6 - Power account [closed]

I am a beginner in the area and during the programming studies in Python I got caught up in this exercise, the purpose being to appear on the user screen how much it should pay for kwh used, depending on whether it is for trade, industry or resi...
asked by 30.12.2017 / 00:17
1
answer

Sweeping String in Search of Substrings Ignoring Accentuation and Case and For Each Match Performing an Action

I need to search a string for a specific substring and for each occurrence found, I should perform a substitute action that was written in the bold version as listed, ignoring accent and case. Example: I have the list with the items:...
asked by 14.11.2017 / 18:08
5
answers

str_split does not work well in UTF-8 containing string?

I want to iterate a string with foreach . For this, I learned that I should use the str_split function, which separates each character from the string into a array . But this operation does not work as expected when using str...
asked by 01.02.2016 / 19:50
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
1
answer

How to get a name inside a string in php?

$resultado = "spawn needle /var/www/html/trabalho/arquivo/emboss/needle/alvos.txt /var/www/html/trabalho/arquivo/emboss/needle/modelos.txt Needleman-Wunsch global alignment of two sequences Warning: Unknown swissprot line type ' ' Warning: Unknow...
asked by 04.08.2017 / 22:30
0
answers

PLN - Ideas on how to identify subject and predicate

I started working on a project in my spare time. At the moment I need to know how to identify the subject in a sentence, of course a sentence in Portuguese br is composed of subject + predicate, I'm assuming that all the sentences come in that f...
asked by 23.05.2017 / 02:19