Use the insert method.

info.insert(19, Misc.toTimestampLiteral(currentDate));
Answer from user425367 on Stack Overflow
🌐
Tutorialspoint
tutorialspoint.com › java › lang › stringbuilder_append_subsequence.htm
Java.lang.StringBuilder.append() Method
The java.lang.StringBuilder.ap... to this sequence. Characters of the argument s, starting at index start, are appended, in order, to the contents of this sequence up to the (exclusive) index end....
Discussions

string - java: use StringBuilder to insert at the beginning - Stack Overflow
Append each string to a StringBuilder. Reverse the entire StringBuilder when you're done. This will turn an O(n²) solution into O(n). ... Sign up to request clarification or add additional context in comments. ... ...since it makes AbstractStringBuilder move all the contents past the index of ... More on stackoverflow.com
🌐 stackoverflow.com
Appending character at the front in the StringBuilder

just do a .reverse on the sb.toString() at the end.. surely that's 10x more readable

More on reddit.com
🌐 r/javahelp
5
3
October 14, 2016
Not sure how to go about changing characters at an index of a string
Strings are immutable in Java, so if you want to change a letter in a String, you have to create a whole new String. I mean, I suppose what you could do is convert the String into a char array and use that, but depending on what you need it for, it might be more trouble than it's worth. More on reddit.com
🌐 r/javahelp
9
4
October 6, 2015
[Java] What exactly is stringBuilder and why use it instead of a traditional String?
If I remember correctly, Java will do things in memory that you might not be aware of. String is an example of this, it will allocate additional memory because it creates a new string object when doing += in Java More on reddit.com
🌐 r/learnprogramming
5
1
January 6, 2021
🌐
Oracle
docs.oracle.com › javase › 7 › docs › api › java › lang › StringBuilder.html
StringBuilder (Java Platform SE 7 )
Let n be the length of this character ... Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str....
🌐
Codecademy
codecademy.com › docs › java › stringbuilder › .insert()
Java | StringBuilder | .insert() | Codecademy
August 22, 2022 - If str is a String, a CharSequence*, or a char[] array**, the characters contained are inserted at index and its capacity is increased by the number of characters inserted. For other types, it behaves as if str was first converted to a string ...
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › StringBuilder.html
StringBuilder (Java Platform SE 8 )
April 21, 2026 - Let n be the length of this character ... Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str....
🌐
Blogger
javahungry.blogspot.com › 2022 › 04 › stringbuilder-append-start.html
StringBuilder append to the start/front [3 ways] | Java Hungry
It is easy to append text to the start/front of the StringBuilder object using the insert() method. The insert() method of the StringBuilder class inserts the specified text at the specified index.
Find elsewhere
🌐
Oracle
docs.oracle.com › cd › E17802_01 › j2se › j2se › 1.5.0 › jcp › beta2 › apidiffs › java › lang › StringBuilder.html
java.lang Class StringBuilder
Let n be the length of this character ... Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n ; otherwise, it is equal to the character at index k-n in the argument str....
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.text.stringbuilder.append
StringBuilder.Append Method (System.Text) | Microsoft Learn
The Append(String, Int32, Int32) method modifies the existing instance of this class; it does not return a new class instance. Because of this, you can call a method or property on the existing reference and you do not have to assign the return ...
🌐
Oracle
docs.oracle.com › javase › 6 › docs › api › java › lang › StringBuilder.html
StringBuilder (Java Platform SE 6)
Let n be the length of this character ... Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str....
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › api › system.text.stringbuilder.insert
StringBuilder.Insert Method (System.Text) | Microsoft Learn
Inserts one or more copies of a specified string into this instance at the specified character position. public: System::Text::StringBuilder ^ Insert(int index, System::String ^ value, int count);
🌐
Tutorialspoint
tutorialspoint.com › java › lang › stringbuilder_insert_chararray_len.htm
Java.lang.StringBuilder.insert() Method
The java.lang.StringBuilder.insert(int index, char[] str, int offset, int len) method inserts the string representation of a subarray of the str array argument into this sequence.
🌐
Classpath
developer.classpath.org › doc › java › lang › StringBuilder.html
StringBuilder (GNU Classpath 0.95 Documentation)
This is like #append(char), but will append two characters if a supplementary code point is given. ... Get the total number of characters this StringBuilder can support before it must be grown. Not to be confused with length. ... Get the character at the specified index.
🌐
Codecademy
codecademy.com › docs › java › stringbuilder › .append()
Java | StringBuilder | .append() | Codecademy
August 22, 2022 - In this case, .append() will append the subsequence defined by the start point and length specified by start and len. The following example creates a StringBuilder with a specified String and then uses the .append() method to change it:
🌐
B4X
b4x.com › help › stringsex › Stack.htm
StringBuilder
Append(addstring As String) : Appends addstring to the end of the StringBuilder. At(index As Int32) : Returns the character at position index in the StringBuilder.
🌐
BeginnersBook
beginnersbook.com › 2022 › 10 › java-stringbuilder-insert
Java StringBuilder insert()
October 4, 2022 - The insert() method of Java StringBuilder class is used to insert the given element at the specified position in this character sequence. ... //insert string "hello" at the position (index) 1 sb.insert(1, "hello"); //insert integer 100 at the index 2 sb.insert(2, 100); //insert boolean 'true' ...
🌐
GeeksforGeeks
geeksforgeeks.org › java › stringbuilder-append-method-in-java-with-examples
StringBuilder append() Method in Java - GeeksforGeeks
July 11, 2025 - This version appends a subarray of characters to the StringBuilder, starting at the specified offset and with the specified length.
🌐
Google
developers.google.com › j2objc › stringbuilder
StringBuilder | J2ObjC | Google for Developers
Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument sb.
🌐
Oracle
docs.oracle.com › en › java › javase › 18 › docs › api › java.base › java › lang › StringBuilder.html
StringBuilder (Java SE 18 & JDK 18)
August 18, 2022 - Appends the string representation of the codePoint argument to this sequence. ... Returns the current capacity. ... Returns the char value in this sequence at the specified index.