MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Reverse

Method Reverse

Source/Engine/Utilities/StringUtils.cs:246–251  ·  view source on GitHub ↗

Reverses the specified input string. Correctly handles all UTF-16 strings The string to reverse. The reversed string.

(this string s)

Source from the content-addressed store, hash-verified

244 /// <param name="s">The string to reverse.</param>
245 /// <returns>The reversed string.</returns>
246 public static string Reverse(this string s)
247 {
248 string[] graphemes = s.GraphemeClusters().ToArray();
249 Array.Reverse(graphemes);
250 return string.Concat(graphemes);
251 }
252
253 /// <summary>
254 /// Removes any new line characters (\r or \n) from the string.

Callers 1

Calls 2

GraphemeClustersMethod · 0.80
ToArrayMethod · 0.45

Tested by

no test coverage detected