GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BSON_STRING_TRUNCATE(3) libbson BSON_STRING_TRUNCATE(3)

WARNING:

Deprecated since version 1.29.0.



void
bson_string_truncate (bson_string_t *string, uint32_t len);


  • string: A bson_string_t.
  • len: The new length of the string, excluding the trailing \0.

Truncates the string so that it is len bytes in length. This must be smaller or equal to the current length of the string.

A \0 byte will be placed where the end of the string occurs.

WARNING:

This function is oblivious to UTF-8 structure. If truncation occurs in the middle of a UTF-8 byte sequence, the resulting bson_string_t will contain invalid UTF-8.


WARNING:

The length of the resulting string (including the NULL terminator) MUST NOT exceed UINT32_MAX.


MongoDB, Inc

2009-present, MongoDB, Inc.

July 3, 2025 1.30.4

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.