HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to DelphiVariablesData Types & ConversionOperatorsStringsConditions (if)Loops (for / while)Functions
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔄 Data Types & Conversion
✍️ String
+ / LengthUpperCase / LowerCaseCopy / Pos
🔁 Condition & Loop
🧩 Function & Procedure
Delphi›REFERENCE›String
✍️

String

Concatenation, length, and uppercase.

CommandDescription
+ / LengthString concatenation and length.
UpperCase / LowerCaseCase conversion.
Copy / PosSubstring extraction and searching.

+ / Length

Try it yourself →

String concatenation and length.

Syntax

s1 + s2  ·  Length(s)

Description

Strings are concatenated with +; Length(s) gives the number of characters.

Example

program H;
{$MODE DELPHI}
var s: String;
begin
  s := 'Hex' + 'Library';
  writeln(s, ' ', Length(s));
end.

Expected output

HexLibrary 10

When to use?

Creating strings.

UpperCase / LowerCase

Try it yourself →

Case conversion.

Syntax

UpperCase(s)

Description

UpperCase makes it uppercase, LowerCase makes it lowercase. SysUtils is required.

Example

program H;
{$MODE DELPHI}
uses SysUtils;
begin
  writeln(UpperCase('hexlibrary'));
end.

Expected output

HEXLIBRARY

When to use?

Comparison, representation.

Copy / Pos

Try it yourself →

Substring extraction and searching.

Syntax

Copy(s, start, length) · Pos(alt, s)

Description

Copy(s, 1, 3) gets 3 characters from the start (1-indexed!). Pos gives the position of the substring (0 if not found).

Example

program H;
{$MODE DELPHI}
begin
  writeln(Copy('HexLibrary', 1, 3));
  writeln(Pos('Lib', 'HexLibrary'));
end.

Expected output

Hex
4

When to use?

Text slicing, searching.

Common mistakes

  • ⚠️ Pascal/Delphi string indexing starts at 1: Copy(s,1,3) is the first 3 characters.
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code