Documentation
Back to website >

SplitPostalCode (Pascalscript)

Description

The SplitPostalCode function extracts the postal code from a complete city, the country, zip code and city contains the postal code.

Syntax

function SplitPostalCode(const S: string): string;

Arguments

The function filters the postal code from a long city name consisting of country, zip code and city name.

Excample

var
  S1: String;
  S2: String;
begin
  S1:='D 65527 Niedernhausen';
  S2:=SplitPostalCode(S1);
  ShowMessage(S2);
end;

Rules to understand the script can be found here.

The text 'D 65527 Niedernhausen' is assigned to the string variable S1. The SplitPostalCode function filters the postal code and assigns it to variable S2.

ShowMessage shows: 65527