Here's a C# function that takes a string containing angle brackets and returns the same string with each opening angle bracket <
replaced with a closing angle bracket >
:
main.cs502 chars19 lines
You can call this function like so:
main.cs165 chars4 lines
This function loops through each character in the input string and checks if it is an opening angle bracket. If it is, it replaces it with a closing angle bracket. Finally, it returns the modified string.
gistlibby LogSnag