Skip to content

Commit

Permalink
Strings, TStr: +TSpecialChars record
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdp committed May 16, 2022
1 parent 8fa3c3b commit b6ac3a7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
32 changes: 31 additions & 1 deletion Base/JPL.Strings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
Jacek Pazera
http://www.pazera-software.com
https://www.pazera-software.com
https://github.com/jackdp
To jest mój stary moduł z roku 2000 dla Borland Pascala 7.0
Expand All @@ -29,6 +29,36 @@ interface
ENDL = sLineBreak;
DEG = '°';

type
TSpecialChars = record
const Tab = #9;
const Euro = '';
const Copyright = '©';
const Reg = '®';
const Paragraph = '';
const Section = '§';
const Degree = '°';
const Sup2 = '²';
const Sup3 = '³';
const Integral = '';
const Micro = 'µ';
const PlusMinus = '±';
const Times = '×';
const Divide = '÷';
const OmegaBig = 'Ω';
const AlphaSmall = 'α';
const BetaSmall = 'β';
const GammaSmall = 'γ';
const DeltaSmall = 'δ';
const DeltaBig = 'Δ';
const PiSmall = 'π';
const PiBig = 'Π';
const SigmaBig = 'Σ';
const Bullet = '';
const DashLong = '';
const Trademark = '';
end;


{$IFDEF DELPHI2009_OR_BELOW}
type
Expand Down
29 changes: 28 additions & 1 deletion Base/JPL.TStr.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
Jacek Pazera
http://www.pazera-software.com
https://www.pazera-software.com
https://github.com/jackdp
}

Expand Down Expand Up @@ -34,6 +34,33 @@ TStr = record
class function GetTimeSeparator: Char; static;
class procedure SetTimeSeparator(const Value: Char); static;
public
const CharTab = TSpecialChars.Tab;
const CharEuro = TSpecialChars.Euro;
const CharCopyright = TSpecialChars.Copyright;
const CharReg = TSpecialChars.Reg;
const CharParagraph = TSpecialChars.Paragraph;
const CharSection = TSpecialChars.Section;
const CharDegree = TSpecialChars.Degree;
const CharSup2 = TSpecialChars.Sup2;
const CharSup3 = TSpecialChars.Sup3;
const CharIntegral = TSpecialChars.Integral;
const CharMicro = TSpecialChars.Micro;
const CharPlusMinus = TSpecialChars.PlusMinus;
const CharTimes = TSpecialChars.Times;
const CharDivide = TSpecialChars.Divide;
const CharOmegaBig = TSpecialChars.OmegaBig;
const CharAlphaSmall = TSpecialChars.AlphaSmall;
const CharBetaSmall = TSpecialChars.BetaSmall;
const CharGammaSmall = TSpecialChars.GammaSmall;
const CharDeltaSmall = TSpecialChars.DeltaSmall;
const CharDeltaBig = TSpecialChars.DeltaBig;
const CharPiSmall = TSpecialChars.PiSmall;
const CharPiBig = TSpecialChars.PiBig;
const CharSigmaBig = TSpecialChars.SigmaBig;
const CharBullet = TSpecialChars.Bullet;
const CharDashLong = TSpecialChars.DashLong;
const CharTrademark = TSpecialChars.Trademark;

class function Empty(const s: string): Boolean; static;

class function Pad(Text: string; Len: integer; PaddingChar: Char = ' '): string; overload; static;
Expand Down

0 comments on commit b6ac3a7

Please sign in to comment.