Questions tagged as 'string'

1
answer

Remove against bars for json string format

I have a string inside a dictionary that I am trying to pass to jsonstring but it is not removing the backbars and the server does not swallow it. Any ideas? The code is as follows: let myBod = "\"Body\": {" + "\"type\": \"multipart...
asked by 17.03.2017 / 10:13
3
answers

Duda print String with Java time format

I have a program that receives a time in this format from a GPS: HHmmss.ss and I save it in a String, I wanted to know some way to print the String with this format: HH: mm: ss. I just need to print the time on the screen     
asked by 26.09.2018 / 13:10
1
answer

format of android text strings

Good, I have the following problem: I am making a query to a database, the query brings me a value type String with a format type ###. ###, ## the question I have are the following: 1.- How can I eliminate the commas and points to use that da...
asked by 11.08.2017 / 05:54
3
answers

Convert Date to String in java

I am consuming a web service where I consult an id parameter, and it returns a vehicle object that contains several attributes of type int and string , but the field date I returned it as date. "this is in the database", what...
asked by 28.03.2017 / 18:31
1
answer

Why does it mark me error String index out of range: -1?

String Nombre="armando"; for (int i = 6; i <Nombre.length(); i--) { for (int j = 0; j < Nombre.length(); j++) { char n =Nombre.charAt(i);//Se supone que en esta linea esta el error char matriz[][] = new cha...
asked by 26.10.2018 / 23:25
2
answers

How to separate a string string by spaces? [duplicate]

In Java code, I want to know how I can separate a text string for each space that exists in it.     
asked by 01.09.2017 / 04:22
3
answers

Not to show repeated letters

I want to go through the word and iterate over each of its letters. If it detects that it has already been printed, and does not show the letter (with the help of an auxiliary arrangement), my problem is that I do not know how to carry it out. -...
asked by 25.06.2017 / 20:12
1
answer

Divide a string and put it as attributes of my object

I have a Person class like this: class persona { private String dni; private String nombre; private String apel1; private String apel2; private String ciudad; private String pais; public persona(String dni, String...
asked by 08.07.2017 / 21:43
2
answers

Split string c ++. (split) [duplicate]

Good morning community. How to split a string? Suppose that: string cadena = "abc#123#faker"; The procedure would be that when you get a "#" assign to the resulting string. What I want to be able to do is save in another array s...
asked by 20.04.2017 / 05:02
2
answers

How to get attribute of the one session Java, Spring

I want to create a final variable, but get its value from a session started, for example final static String variable = (String) new HttpServletRequest.getSession().getAttribute("codigoVerificacion"); I hope you can help me, sinc...
asked by 14.11.2016 / 22:04