std-firstchar,std-lastchar,std-str-1


Synopsis

(std-firstchar <str>) ; the first char only

(std-lastchar <str>) ; the last char

(std-lastchars <n> <str>) ; the last n chars

(std-str-1 <str>) ; "string minus one"

(std-str-n <n> <str>) ; the string without the last n chars

Description

Basic String Accessors:

STD-FIRSTCHAR returns the first character of a string.

STD-LASTCHAR returns the last character of a string.

STD-LASTCHARS returns substring with the last n characters of a string.

STD-STR-1 ("string minus one") returns the string without the last character.

STD-STR-N ("string minus n") returns the substring without the last n characters.

Arguments

str: a string which maybe empty

n: a positive integer

Return Value

A string which maybe empty.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR