How to use RemoveDiacritics method of NBi.Core.Transformation.Transformer.Native.Text.TextToWithoutDiacritics class

Best NBi code snippet using NBi.Core.Transformation.Transformer.Native.Text.TextToWithoutDiacritics.RemoveDiacritics


Source:TextToWithoutDiacritics.cs Github


Full Screen

...6namespace NBi.Core.Transformation.Transformer.Native.Text7{8 class TextToWithoutDiacritics : AbstractTextTransformation9 {10 protected override object EvaluateString(string value) => RemoveDiacritics(value);11 /// <summary>12 /// Remove diacritics from string. Origin value can be null and String.Empty.13 /// Source code from /// </summary>15 /// <param name="value">Origin string value. </param>16 /// <returns>New string value without diacritics.</returns>17 private string RemoveDiacritics(string value)18 {19 if (!string.IsNullOrWhiteSpace(value))20 {21 string stFormD = value.Normalize(NormalizationForm.FormD);22 int len = stFormD.Length;23 StringBuilder sb = new StringBuilder();24 for (int i = 0; i < len; i++)25 {26 System.Globalization.UnicodeCategory uc = System.Globalization.CharUnicodeInfo.GetUnicodeCategory(stFormD[i]);27 if (uc != System.Globalization.UnicodeCategory.NonSpacingMark)28 {29 sb.Append(stFormD[i]);30 }31 }...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run NBi automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in TextToWithoutDiacritics

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?