Skip to main content
-1 votes
1 answer
98 views

I need to replace character sequences in a string, but they are not guaranteed not to be overlapping. The rule in case of conflicts is that ( first, the longest character sequence wins, but this is ...
Vladimirs Kacs's user avatar
0 votes
0 answers
70 views

Note: this is not a duplicate of the question here. That one asks about string concatenation, which is different from string interpolation. Consider this example of string creation in C#: var str = $&...
user3163495's user avatar
  • 3,968
4 votes
4 answers
265 views

Description Guru gave a task to his students.   He gave a sentence,  and the students have to swap the first and the last words and reverse all the characters between those words.   Help the students ...
MARTIN 's user avatar
0 votes
0 answers
38 views

I have a process where I must (de)tokenize payment account information. Currently, when sending a file to client with payment information (among other things), the actual payment account numbers are ...
George's user avatar
  • 2,212
-1 votes
3 answers
149 views

I have read about the StringBuilder API and StringJoiner API and String.join but not sure if I have items in StringBuilder instance, which call to use to do a join with a delimiter of choice. I do not ...
curiousengineer's user avatar
0 votes
0 answers
88 views

What Culture should I use with StringBuilder.Append to have similar functionality to this code: StringBuilder sb = string.empty; string str = ...; sb.Append($"{str}BLABLA\n"); Is it really ...
PhantomR's user avatar
  • 595
2 votes
1 answer
143 views

I met a quite strange case in a program with jdk1.8, that I got a null pointer exception in String.length (which is in StringBuilder.append()) method, the exact position of the null pointer exception ...
Mobility's user avatar
  • 3,355
-1 votes
1 answer
103 views

The Main Issue: Can anyone please explain me why is this IDE is saying to create a constructor for using nextLine() function? package Practice.String_9; import java.util.*; public class ...
Abhishek Yadav's user avatar
0 votes
1 answer
90 views

StringBuilder sb = new StringBuilder("mainWord"); sb.append("secondWord" + "thirdWord"); System.out.println(sb); The append method here accepts a String as a parameter. ...
Rufat Rustamli's user avatar
0 votes
2 answers
960 views

I'm new to Kotlin. I am creating an application in which, after the user selects/picks a PDF file, he will see fragments of the extracted text. Unfortunately each time I read text from the PDF file it ...
ollo's user avatar
  • 983
0 votes
1 answer
67 views

Reconstruct Original Digits from English Given a string s containing an out-of-order English representation of digits 0-9, return the digits in ascending order. I tried the code in Java but it ...
Aryan Kaushik's user avatar
2 votes
1 answer
207 views

This is more of a curiosity question. All our software & hardware on the network are UK based. I'm using the StringBuilder.AppendLine() method to build some basic CSV data for a download on a web ...
Bluetonic's user avatar
-1 votes
1 answer
388 views

In order to gain performance on the StringBuilder operations, I tried to apply the object pooling. But pooling the StringBuilder seems to be slower than the original usage on both net8 and net7. What ...
HighHopes's user avatar
0 votes
0 answers
50 views

I have a jsp file which has an "iframe" tag where my data is shown when user searches for a field. When user clicks search, my servlet gets userdata from the database and create html page ...
DamanS's user avatar
  • 1
1 vote
2 answers
79 views

What I am trying to achieve: I would like to convert a StringBuilder + forloop, like this: public String question(List<MyPojo> myPojos) { final StringBuilder stringBuilder = new ...
PatPanda's user avatar
  • 5,418

15 30 50 per page
1
2 3 4 5
142