Proper$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns a mixed-case string, where only the first letter of each word is capitalized. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

Proper$( string_expr ) 

string_expr is a string expression.

Return Value

String

Description

The Proper$() function first converts the entire string_expr string to lower case, and then capitalizes only the first letter of each word in the string, thus producing a result string with "proper" capitalization. This style of capitalization is appropriate for proper names.

Example

Dim name, propername As String

name = "ed bergen"
propername = Proper$(name)
' propername now contains the string "Ed Bergen"

name = "ABC 123"
propername = Proper$(name)
' propername now contains the string "Abc 123"

name = "a b c d"
propername = Proper$(name)
' propername now contains the string "A B C D"

See Also:

LCase$() function, UCase$() function