Skip to content

Instantly share code, notes, and snippets.

View reinaldoacdc's full-sized avatar

Reinaldo Alberto reinaldoacdc

View GitHub Profile
@reinaldoacdc
reinaldoacdc / StringHelper.pas
Last active February 28, 2022 17:49
String Classhelper
unit StringHelper;
interface
type
TStringHelper = record helper for string
function OnlyNumbers :String;
end;
implementation
@reinaldoacdc
reinaldoacdc / ApplicationHelper.pas
Last active June 27, 2019 01:19
ClassHelper for TApplication
unit ApplicationHelper;
interface
uses Vcl.Forms;
type
TApplicationHelper = class helper for TApplication
procedure OpenForm( frm :TForm; obj :TFormClass);
procedure CloseAllForms;
procedure Log(text: String);
unit StringGridHelper;
interface
uses
Vcl.Grids;
type
TStringGridHelper = class helper for TStringGrid
unit JsonObjectHelper;
interface
uses DBXJSON, Character;
type TJsonObjectHelper = class helper for TJsonObject
public
//Helper to find a JSON pair based on the pair string part
function Get(const PairName: UnicodeString): TJSONPair; overload;
unit FormHelper;
interface
uses Forms;
type
TFormHelper = class helper for TForm
unit BitmapHelper;
interface
uses FMX.Graphics;
type
TBitmapHelper = class helper for TBitmap
function ToBase64 :String;
end;
@reinaldoacdc
reinaldoacdc / DateUtilsHelper.pas
Created July 15, 2022 22:19
Ddateutils Helper
function MonthName(n: Integer): String;
const
aMeses :array[0..11] of String = ( 'Janeiro', 'Fevereiro', 'Mar�o', 'Abril', 'Maio', 'Junho',
'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' );
begin
Result := aMeses[n-1];
end;
@reinaldoacdc
reinaldoacdc / VariantsHelper.pas
Last active August 31, 2022 14:20
VariantsHelper.pas
unit VariantsHelper;
interface
type
TVariantsHelper = record helper for variants
function ValueInRange(const ARange: array of Variant): Boolean;
end;
implementation
@reinaldoacdc
reinaldoacdc / IntegerHelper.pas
Created August 31, 2022 14:37
IntegerHelper
unit IntegerHelper;
interface
type
TIntegerHelper = record helper for integer
function toRomans: String;
end;