Questions tagged as 'string'

1
answer

Find hidden word with regex

I'm trying to find a hidden word with regex, but I do not understand why my code does not work. String s = "ahwereovnkejfnlvienfvia"; String regex = "[a-z]h[a-z]o[a-z]l[a-z]a[a-z]"; String regex2 = ".h.o.l.a." Pattern p = Pattern.compile(regex...
asked by 12.08.2017 / 16:41
1
answer

Read / write char arrays in binary files

I am trying to binary save strings from static character arrays and then print them. The point is that, in spite of the fact that I assign them the value in a static way (so when creating them, they should be created with the %code% at th...
asked by 05.04.2018 / 10:54
2
answers

How to make java recognize me a paragraph

only with a query. It's about that I'm creating a java game similar to Tamagochi from the 90's. You must have the option to create Pokemon, where you can enter the name of the Pokémon; in addition to this the player can enter an "image" of chara...
asked by 13.03.2018 / 03:01
2
answers

Retrieve accents in C #

I can not retrieve a text with a tilde in StringBuilder of c # The silly example would be this: System.Text.StringBuilder sbEx = new System.Text.StringBuilder(); sbEx.Append("<br />Hoy es día " + dia.ToShortDateString() + "."...
asked by 03.07.2017 / 12:06
1
answer

treat filled strings character to character in c

I'm used to other languages. Now I'm in C. I have filled in a "string" character to character and when printing it, nothing appears, I do not know if it is because of the null terminator or for what reason. I would appreciate help. I just want t...
asked by 12.02.2018 / 17:36
1
answer

Replace special characters

I have a file in php that searches for files inside a directory (folder) the file is called (# file # example.mp3) and the link of that file is saved in an array $files[] = array( "name" => $f, "type...
asked by 19.05.2016 / 00:27
12
answers

How to correctly compare Strings (and objects) in Java?

I am creating a mini game in which the user tries to guess a name. But when I want to compare two text strings to see if they are equal it does not seem to work. final String miNombre = "Jordi"; Scanner input = new Scanner(System.in); System.o...
asked by 02.12.2015 / 13:35
2
answers

Create string lists

I'm trying to copy the words of a file .txt into a linked list. I wrote something but what happens is that the program closes in a moment, as if there was an error in the assignment of the memory. I do not understand where I'm wrong. #i...
asked by 04.02.2016 / 17:59
2
answers

Separate single quote in String JS

I have a string like this: var cadena = '<form name="name" th:action=" 'ERROR' ">'; I have some single quotes within the string and that is what limits the start and the end, how can I do to include the escape characters as part of th...
asked by 04.06.2018 / 13:47
2
answers

Separate a URL in its parts

I am trying to write a method that is called separarURL() , that receives a string of characters from a URL and returns an array of three Strings, containing the protocol, the server and the resource of the received URL. Example:   ...
asked by 16.01.2018 / 16:04