• OCaml logo OCaml logo
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Searching...
    Or go to: Standard Library API
  • Learn
  • Packages
  • Community
  • Blog
  • Playground
  • Get started
  • containers

  • Documentation
  • doc
package containers
  • containers
    • CCArray
      • Infix
      • MONO_ARRAY
    • CCArrayLabels
      • Infix
      • MONO_ARRAY
    • CCAtomic
    • CCBool
    • CCByte_buffer
    • CCCanonical_sexp
      • Make
        • Sexp
    • CCChar
      • Infix
    • CCEither
    • CCEqual
      • Infix
    • CCEqualLabels
      • Infix
    • CCFloat
      • Infix
    • CCFormat
      • ANSI_codes
      • Dump
      • Infix
    • CCFun
      • Infix
      • Monad
        • X
    • CCHash
    • CCHashtbl
      • Make
        • X
      • Poly
      • S
    • CCHeap
      • Make
        • E
      • Make_from_compare
        • E
      • PARTIAL_ORD
      • S
      • TOTAL_ORD
    • CCIO
      • File
    • CCInt
      • Infix
    • CCInt32
      • Infix
    • CCInt64
      • Infix
    • CCList
      • Assoc
      • Infix
      • MONAD
      • Ref
      • Traverse
        • M
    • CCListLabels
      • Assoc
      • Infix
      • MONAD
      • Ref
      • Traverse
        • M
    • CCMap
      • Make
        • O
      • S
    • CCNativeint
      • Infix
    • CCOpt
      • Infix
    • CCOption
      • Infix
    • CCOrd
      • Infix
    • CCPair
    • CCParse
      • Debug_
      • Error
      • Infix
      • Position
      • Slice
      • U
    • CCRandom
    • CCRef
    • CCResult
      • Infix
      • MONAD
      • Traverse
        • M
    • CCSeq
      • Infix
      • MONAD
      • Traverse
        • M
    • CCSet
      • Make
        • O
      • S
    • CCSexp
      • Decoder
      • Make
        • Decoder
        • Sexp
    • CCSexp_intf
      • BASIC_SEXP
      • S
        • Decoder
      • S0
      • SEXP
    • CCSexp_lex
    • CCShims_
    • CCShims_syntax
      • LET
    • CCString
      • Find
      • Infix
      • Split
    • CCStringLabels
      • Find
      • Infix
      • Split
    • CCUnit
    • CCUtf8_string
    • CCVector
    • Containers
      • Hashtbl
        • HashedType
        • MakeSeeded
          • H
        • S
        • SeededHashedType
        • SeededS
    • ContainersLabels
      • Hashtbl
        • HashedType
        • MakeSeeded
          • H
        • S
        • SeededHashedType
        • SeededS
  • containers.bencode
    • Containers_bencode
      • Decode
      • Encode
      • Str_map
  • containers.cbor
    • Containers_cbor
  • containers.codegen
    • Containers_codegen
      • Bitfield
      • Code
  • containers.monomorphic
    • CCMonomorphic
  • containers.top
    • Containers_top
  • containers.unix
    • CCUnix
      • Infix
Legend:
Library
Module
Module type
Parameter
Class
Class type

Decoding

val of_string : string -> t option
val of_string_exn : string -> t

Parse string.

  • raises Failure

    if the string is not valid bencode.

Footer

OCaml

Innovation. Community. Security.

GitHub Discord Twitter Peertube RSS

About Us

  • Industrial Users
  • Academic Users
  • Why OCaml

Resources

  • Get Started
  • Language Manual
  • Standard Library API
  • Books
  • Releases

Community

  • Blog
  • Jobs

Policies

  • Carbon Footprint
  • Governance
  • Privacy
  • Code of Conduct