diff -uNr dmd-0.144/dmd/html/d/changelog.html dmd-0.145/dmd/html/d/changelog.html --- dmd-0.144/dmd/html/d/changelog.html 2006-01-23 00:17:34.000000000 +0100 +++ dmd-0.145/dmd/html/d/changelog.html 2006-01-29 19:12:22.000000000 +0100 @@ -25,7 +25,7 @@ | Comments -
+ +
version(Win32) + { + getExt(r"d:\path\foo.bat") => "bat" + getExt(r"d:\path.two\bar") => null + } + version(linux) + { + getExt(r"/home/user.name/bar.") => "" + getExt(r"d:\\path.two\\bar") => "two\\bar" + getExt(r"/home/user/.resource") => "resource" + } +
version(Win32) + { + getName(r"d:\path\foo.bat") => "d:\path\foo" + getName(r"d:\path.two\bar") => null + } + version(linux) + { + getName("/home/user.name/bar.") => "/home/user.name/bar" + getName(r"d:\path.two\bar") => "d:\path" + getName("/home/user/.resource") => "/home/user/" + } +
version(Win32) + { + getBaseName(r"d:\path\foo.bat") => "foo.bat" + } + version(linux) + { + getBaseName("/home/user.name/bar.") => "bar." + } +
version(Win32) + { + getDirName(r"d:\path\foo.bat") => "d:\path" + getDirName(getDirName(r"d:\path\foo.bat")) => "d:\" + } + version(linux) + { + getDirName(")/home/user" => "/home" + getDirName(getDirName(")/home/user") => "" + } +
getDrive(r"d:\path\foo.bat") => "d:" +
defaultExt("foo.txt", "raw") => "foo.txt" + defaultExt("foo.", "raw") => "foo.raw" + defaultExt("bar", "raw") => "bar.raw" +
addExt("foo.txt", "raw") => "foo.raw" + addExt("foo.", "raw") => "foo.raw" + addExt("bar", "raw") => "bar.raw" +
version(Win32) + { + isabs(r"relative\path") => 0 + isabs(r"d:\absolute") => 1 + } + version(linux) + { + isabs("/home/user") => 1 + isabs("foo") => 0 + } +
version(Win32) + { + join(r"c:\foo", "bar") => "c:\foo\bar" + join("foo", r"d:\bar") => "d:\bar" + } + version(linux) + { + join("/foo/", "bar") => "/foo/bar" + join("/foo", "/bar") => "/bar" + } +
version(Win32) + { + fncharmatch('a', 'b') => 0 + fncharmatch('A', 'a') => 1 + } + version(linux) + { + fncharmatch('a', 'b') => 0 + fncharmatch('A', 'a') => 0 + } +
* | match 0 or more characters - |
? | match any character - |
[chars] | match any character that appears between the [] - |
[!chars] | match any character that does not appear between the [! ] - |
* | +Matches 0 or more instances of any character. |
? | +Matches exactly one instances of any character. |
[chars] | +Matches one instance of any character that appears + between the brackets. |
[!chars] | +Matches one instance of any character that does not appear + between the brackets after the exclamation mark. |
+ Internally individual character comparisons are done calling
+ fncharmatch(), so its rules apply here too. Note that path
+ separators and dots don't stop a meta-character from matching
+ further portions of the filename.
+
+Returns:
+non zero if pattern matches filename, zero otherwise.
- Matching is case sensitive on a file system that is case sensitive.
+
+See Also:
+fncharmatch().
-Returns:
-!=0 for match
+Throws:
+Nothing.
+
+
+Examples:
+
version(Win32) + { + fnmatch("foo.bar", "*") => 1 + fnmatch(r"foo/foo\bar", "f*b*r") => 1 + fnmatch("foo.bar", "f?bar") => 0 + fnmatch("Goo.bar", "[fg]???bar") => 1 + fnmatch(r"d:\foo\bar", "d*foo?bar") => 1 + } + version(linux) + { + fnmatch("Go*.bar", "[fg]???bar") => 0 + fnmatch("/foo*home/bar", "?foo*bar") => 1 + fnmatch("foobar", "foo?bar") => 1 + } +