Skip to content

Latest commit

 

History

History
318 lines (167 loc) · 11.1 KB

scml_base_bytevector.md

File metadata and controls

318 lines (167 loc) · 11.1 KB

Module scml_base_bytevector

Scheme base library for bytevectors

. __Authors:__ CSCM Contributor ([`the-concurrent-schemer@googlegroups.com`](mailto:the-concurrent-schemer@googlegroups.com)).

Function Index

'$scml_exports'/0
'bytevector-append'/1

Returns a bytevector whose bytes are the concatenation of the bytes in the given bytevectors.

.
'bytevector-copy!'/3

unsupported

.
'bytevector-copy!'/4

unsupported

.
'bytevector-copy!'/5

unsupported

.
'bytevector-copy'/1Equivalent to 'bytevector-copy'(V, 0, 'bytevector-length'(V)).
'bytevector-copy'/2Equivalent to 'bytevector-copy'(V, Start, 'bytevector-length'(V)).
'bytevector-copy'/3

Returns a bytevector constructed from the bytes of bytevector beginning with index start and ending with index end.

.
'bytevector-length'/1

Returns the number of bytes in the given bytevector.

.
'bytevector-u8-ref'/2

Returns byte k of bytevector using zero-origin indexing. It is an error if k is not a valid index of bytevector.

.
'bytevector-u8-set!'/3

unsupported

.
'bytevector?'/1

Returns #t if obj is a bytevector, otherwise returns #f.

.
'make-bytevector'/1Equivalent to 'make-bytevector'(K, 0).
'make-bytevector'/2

Returns a bytevector of k bytes.

.
'string->utf8'/1Equivalent to 'string->utf8'(S, 0, 'string-length'(S)).
'string->utf8'/2Equivalent to 'string->utf8'(S, Start, 'string-length'(S)).
'string->utf8'/3

encodes the characters of a string between start and end and returns the corresponding bytevector.

.
'utf8->string'/1Equivalent to 'utf8->string'(V, 0, 'bytevector-length'(V)).
'utf8->string'/2Equivalent to 'utf8->string'(V, Start, 'bytevector-length'(V)).
'utf8->string'/3

Decodes the bytes of a bytevector between start and end and returns the corresponding string.

.
bytevector/1

Returns a bytevector whose bytes contain the given arguments.

.

Function Details

'$scml_exports'/0


'$scml_exports'() -> [{scm_symbol(), scmi_nip()}]



'bytevector-append'/1


'bytevector-append'(Vs::[scm_bytevector(), ...]) -> scm_bytevector()



Returns a bytevector whose bytes are the concatenation of the bytes in the given bytevectors.

'bytevector-copy!'/3


'bytevector-copy!'(To::scm_bytevector(), At::scm_k(), From::scm_bytevector()) -> scm_false()



unsupported

'bytevector-copy!'/4


'bytevector-copy!'(To::scm_bytevector(), At::scm_k(), From::scm_bytevector(), Start::scm_start()) -> scm_false()



unsupported

'bytevector-copy!'/5


'bytevector-copy!'(To::scm_bytevector(), At::scm_k(), From::scm_bytevector(), Start::scm_start(), End::scm_end()) -> scm_false()



unsupported

'bytevector-copy'/1


'bytevector-copy'(V::scm_bytevector()) -> scm_bytevector()



Equivalent to 'bytevector-copy'(V, 0, 'bytevector-length'(V)).

'bytevector-copy'/2


'bytevector-copy'(Bytevector::scm_bytevector(), Start::scm_start()) -> scm_bytevector()



Equivalent to 'bytevector-copy'(V, Start, 'bytevector-length'(V)).

'bytevector-copy'/3


'bytevector-copy'(Bytevector::scm_bytevector(), Start::scm_start(), End::scm_end()) -> scm_bytevector()



Returns a bytevector constructed from the bytes of bytevector beginning with index start and ending with index end.

'bytevector-length'/1


'bytevector-length'(Bytevector::scm_bytevector()) -> scm_k()



Returns the number of bytes in the given bytevector.

'bytevector-u8-ref'/2


'bytevector-u8-ref'(Bytevector::scm_bytevector(), K::scm_k()) -> scm_byte()



Returns byte k of bytevector using zero-origin indexing. It is an error if k is not a valid index of bytevector.

'bytevector-u8-set!'/3


'bytevector-u8-set!'(V::scm_bytevector(), K::scm_k(), Byte::scm_byte()) -> scm_false()



unsupported

'bytevector?'/1


'bytevector?'(Bytevector::scm_obj()) -> scm_boolean()



Returns #t if obj is a bytevector, otherwise returns #f.

'make-bytevector'/1


'make-bytevector'(K::scm_k()) -> scm_bytevector()



Equivalent to 'make-bytevector'(K, 0).

'make-bytevector'/2


'make-bytevector'(K::scm_k(), Byte::scm_byte()) -> scm_bytevector()



Returns a bytevector of k bytes.

'string->utf8'/1


'string->utf8'(String::scm_string()) -> scm_bytevector()



Equivalent to 'string->utf8'(S, 0, 'string-length'(S)).

'string->utf8'/2


'string->utf8'(String::scm_string(), Start::scm_start()) -> scm_bytevector()



Equivalent to 'string->utf8'(S, Start, 'string-length'(S)).

'string->utf8'/3


'string->utf8'(String::scm_string(), Start::scm_start(), End::scm_end()) -> scm_bytevector()



encodes the characters of a string between start and end and returns the corresponding bytevector.

'utf8->string'/1


'utf8->string'(Bytevector::scm_bytevector()) -> scm_string()



Equivalent to 'utf8->string'(V, 0, 'bytevector-length'(V)).

'utf8->string'/2


'utf8->string'(Bytevector::scm_bytevector(), Start::scm_start()) -> scm_string()



Equivalent to 'utf8->string'(V, Start, 'bytevector-length'(V)).

'utf8->string'/3


'utf8->string'(Bytevector::scm_bytevector(), Start::scm_start(), End::scm_end()) -> scm_string()



Decodes the bytes of a bytevector between start and end and returns the corresponding string.

bytevector/1


bytevector(Bytes::[scm_byte(), ...]) -> scm_bytevector()



Returns a bytevector whose bytes contain the given arguments.