git_oid_fromstrn

Parse N characters of a hex formatted object id into a git_oid.

If N is odd, the last byte's high nibble will be read in and the low nibble set to zero.

  1. int git_oid_fromstrn(.git_oid* out_, const(char)* str, size_t length, .git_oid_t type)
    version(GIT_EXPERIMENTAL_SHA256)
    extern (C) nothrow @nogc public
    int
    git_oid_fromstrn
    (,
    const(char)* str
    ,
    size_t length
    ,)
  2. int git_oid_fromstrn(.git_oid* out_, const(char)* str, size_t length)

Parameters

out_ .git_oid*

oid structure the result is written into.

str const(char)*

input hex string of at least size length

length size_t

length of the input string

type .git_oid_t

the type of object id

Return Value

Type: int

0 or an error code

Meta