Skip to content

UCASE


Returns an upper case copy of a string

Syntax

vb
declare function Ucase ( byref str as const string, byval mode as long = 0 ) as string
declare function Ucase ( byref str as const wstring, byval mode as long = 0 ) as wstring

Usage

` result = Ucase[$]( str [ , mode ] )

`

Parameters

str

String to convert to uppercase.

mode

The conversion mode: 0 = current locale, 1 = ASCII only

Return Value

Uppercase copy of str.

Description

Returns a copy of str with all of the letters converted to upper case.

If str is empty, the null string ("``") is returned.

Examples

start GeSHi

vb
Print UCase("AbCdEfG")

end GeSHi

will produce the output:

ABCDEFG

Platform Differences

  • The wide-character string version of Ucase is not supported for DOS target.

Dialect Differences

  • The string type suffix "$" is required in the -lang qb dialect.
  • The string type suffix "$" is optional in the -lang fblite dialect.
  • The string type suffix "$" is ignored in the -lang fb dialect, warn only with the -w suffix compile option (or -w pedantic compile option).

Differences from QB

  • QB does not support Unicode.

See also

  • Lcase

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft