basename

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DavinciWiki_Function}}
+
{{DavinciWiki_Function|
[[category:C_Programs]]
+
Returns file portion of a path/file string. The basename function searches the specified string for the last occurance of the '/' character, and duplicates and returns everything after it.  If the '/' character does not appear in the string, the entire string is duplicated and returned.
 +
|
 +
Arguments: A text buffer or string
 +
 +
Return Value: A variable containing a string
 +
|
 +
[[Syntax]]: basename(obj = STRING / TEXT [, ext = STRING])
 +
|
 +
  dv> k="/themis/data/test.qub"
 +
  "/themis/data/test.qub"
 +
 +
  dv> basename(k)
 +
  "test.qub"
 +
|
 +
|
 +
|
 +
*[[dirname]]
 +
|
 +
|
 +
}}
 
[[category:Functions]]
 
[[category:Functions]]
 +
[[category:Davinci Core]]
 
[[category:String Functions]]
 
[[category:String Functions]]

Latest revision as of 10:25, 23 March 2006



Description

Returns file portion of a path/file string. The basename function searches the specified string for the last occurance of the '/' character, and duplicates and returns everything after it. If the '/' character does not appear in the string, the entire string is duplicated and returned.

Arguments and Return Values

Arguments: A text buffer or string

Return Value: A variable containing a string

Usage

Syntax: basename(obj = STRING / TEXT [, ext = STRING])

Examples

 dv> k="/themis/data/test.qub"
 "/themis/data/test.qub"

 dv> basename(k)
 "test.qub"

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 03-23-2006

Personal tools