You are looking at historical revision 19761 of this page. It may differ significantly from its current revision.

uuid-lib

OSF DCE 1.1 UUID

Documentation

Wrapper for uuid/uuid.h procedures on MacOS X, and Linux.

When an argument is not of the expected type the routines will silently fail by returning #f, no matter what the declared return type.

Predicates

uuid?

[procedure] (uuid? UUID) => boolean

Is UUID a uuid?

uuid-null?

[procedure] (uuid-null? UUID) => boolean

Is UUID the null-uuid?

uuid-compare

[procedure] (uuid-compare UUID1 UUID2) => integer

Returns -1, 0. or 1 for the comaprison of UUID1 and UUID2.

uuid=?

[procedure] (uuid=? UUID1 UUID2) => boolean

Are UUID1 and UUID2 equal?

uuid<>?

[procedure] (uuid<>? UUID1 UUID2) => boolean

Are UUID1 and UUID2 not equal?

uuid<?

[procedure] (uuid<? UUID1 UUID2) => boolean

Does UUID1 order below UUID2?

uuid>?

[procedure] (uuid>? UUID1 UUID2) => boolean

Does UUID1 order above UUID2?

uuid<=?

[procedure] (uuid<=? UUID1 UUID2) => boolean

Does UUID1 order below or the same as UUID2?

uuid>=?

[procedure] (uuid>=? UUID1 UUID2) => boolean

Does UUID1 order above or the same as UUID2?

Operations

uuid-clear!

[procedure] (uuid-clear! UUID) => uuid

Returns the UUID set to the null-uuid.

uuid-copy

[procedure] (uuid-copy UUID) => uuid

Returns a copy of the UUID.

uuid-generate

[procedure] (uuid-generate [#:method METHOD]) => uuid

Returns a new uuid.

METHOD is #f, 'random, or 'time. Default is #f.

An invalid METHOD is an error condtion.

uuid-parse

[procedure] (uuid-parse UUID-TEXT) => uuid

Returns a new uuid from the external string representation UUID-TEXT.

uuid-unparse

[procedure] (uuid-unparse UUID [#:case CASE]) => string

Returns the external string representation of UUID.

CASE is #f, 'upper, or 'lower. Default is #f.

An invalid CASE is an error condtion.

Usage

(require-extension uuid-lib)

Author

Kon Lovett

Version history

1.3.0
Exposed uuid-compare.
1.2
Hello.

License

Copyright (C) 2010 Kon Lovett. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.