-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[unicode]
reverse()
learned not to break composite character sequen…
…ces.
- Loading branch information
1 parent
3b933a5
commit bd64a60
Showing
5 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using DevLab.JmesPath.Utils; | ||
using System; | ||
using System.Linq; | ||
|
||
namespace jmespath.net.Functions.Impl | ||
{ | ||
internal static class TextExtensions | ||
{ | ||
/// <summary> | ||
/// Supports the `reverse()` the function. | ||
/// </summary> | ||
/// <param name="text"></param> | ||
/// <returns></returns> | ||
public static Text Invert(this Text text) | ||
=> (Text)String.Join( "", text.ToArray().Reverse() ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters