Close
Close window
CharacterMap - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

StringTools

CharacterMap

transliterate characters in a string

Calling Sequence

CharacterMap( from, to, s )

Parameters

from

-

string; what characters to change

to

-

string; what characters to change to

s

-

string; string to use

Description

The CharacterMap( from, to, s ) function transliterates the characters in the string s. A pair of strings, from and to, of equal length must be specified. Characters that appear in the first string (from) are mapped to the corresponding character in the second string (to).

A string is returned that is obtained from string s by replacing each occurrence of the character from[i] in s with the character to[i], for each i.

This function is part of the StringTools package, and so it can be used in the form CharacterMap(..) only after executing the command with(StringTools). However, it can always be accessed through the long form of the command by using the form StringTools[CharacterMap](..).

All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters. Thus, there is no support for multibyte character encodings, such as unicode encodings.

Examples

>

withStringTools:

>

CharacterMap ,:,This is a test

This:is:a:test

(1)
>

CharacterMapaeiou,AEIOU,This is a test.

ThIs Is A tEst.

(2)

See Also


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /