/// <summary> /// Verifies if the text qualifies as a valid floating number. /// </summary> /// <param name="text">text to verify</param> /// <returns>returns true if the text has qualified as a valid floating number</returns> public static bool IsValidFloatingNumber(this ISegment segment, params char[] separators) { var text = segment.GetString(false); if (string.IsNullOrEmpty(text)) { return(true); } return(NumberTokenHelper.IsValidFloating(text)); }
/// <summary> /// Verifies if the text qualifies as a valid floating number. /// </summary> /// <param name="text">text to verify</param> /// <returns>returns true if the text has qualified as a valid floating number</returns> public static bool IsValidFloatingNumber(this ISegment segment, params char[] separators) { var text = segment.GetString(false); return(NumberTokenHelper.IsValidFloating(text)); }
public static int GetSegmentEditDistance(this ISegment segment, string replacementText) { var textSegment = segment.GetString(); return(LevenshteinDistance.Calculate(textSegment, replacementText)); }