- Joined
- Jun 29, 2022
- Messages
- 28
- Reaction score
- 0
I'm in the process of porting Java code to C#. The StringBuilder class in Java appears to have many more methods than the one in C#. I'm curious about (say) the Java functionality.
This appears to be lacking in C#
The first two, I think, may be modeled by
Would the third, however, work on a replica of the sb's contents rather than the real contents?
Is there a standardized way to add this capability to all missing methods?
Source: StringBuilder Class in Java
Code:
sb.indexOf(s);
sb.charAt(i);
sb.deleteCharAt(i);
This appears to be lacking in C#
The first two, I think, may be modeled by
Code:
sb.ToString().IndexOf(s);
sb.ToString().CharAt(i);
Is there a standardized way to add this capability to all missing methods?
Source: StringBuilder Class in Java
Last edited: