Help Center

DWStrCSetfunction

Returns a string containing a centered (padded) string.

String ManagementfunctionDWSTRProcs.incdocumented

Syntax

FUNCTION DWStrCSet (BYREF wszSourceString AS CONST WSTRING, BYVAL nStringLength AS LONG, BYREF wszPadCharacter AS CONST WSTRING = " ") AS DWSTRING

Parameters

NameDescription
wszSourceStringThe string to be justified.
nStringLengthThe length of the new string.
wszPadCharacterThe character to be used for padding. If it is not specified, the string will be padded with spaces.

Description

Returns a string containing a centered (padded) string.

Example

DIM dws AS DWSTRING = DWStrCSet("FreeBasic", 20, "") ' Output: "FreeBasic"

Reference

  • Include file DWSTRProcs.inc
  • Defined in AfxNova/DWStrProcs.inc:1134
  • Documented in String Management/DWString Procedures.md
  • Topic: String Procedures