Skip to content

Commit

Permalink
Added period to automatic decimal mark convertion (instead of dari) w…
Browse files Browse the repository at this point in the history
…hen the next character is a number.
  • Loading branch information
mugli committed Feb 8, 2014
1 parent d008071 commit 5ce1948
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions Keyboard and Spell checker/Classes/clsEnglishToBangla.pas
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
Function NextTEx(iLength: Integer; skipstart: Integer = 0): String;
Function Vowel(Const T: String): Boolean;
Function Consonent(Const T: String): Boolean;
Function Number(Const T: String): Boolean;
Function Begining: Boolean;
Public
Constructor Create; // Initializer
Expand Down Expand Up @@ -516,8 +517,13 @@
If Cnv('..', b_Dari + b_Dari) = True Then
Exit; // ||

If Cnv('.', b_Dari) = True Then
Exit; // |
if Number(NextT) = True then begin
If Cnv('.', '.') = True Then
Exit; // Decimal Mark
end
else
If Cnv('.', b_Dari) = True Then
Exit; // |
End;

{ =============================================================================== }
Expand Down Expand Up @@ -1416,6 +1422,27 @@

End;


Function TEnglishToBangla.Number(Const T: String): Boolean;
Var
temp: Char;
myT: String;
Begin
Result := False;
myT := LowerCase(T);
temp := #0;
If length(myT) > 0 Then
temp := myT[1];

Case temp Of
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
Number := True;
Else
Number := False;
End;
End;

{$HINTS On}


End.

0 comments on commit 5ce1948

Please sign in to comment.