Character meanings of phppack and unpack touchpad _ PHP Tutorial

Source: Internet
Author: User
Character meanings of phppack and unpack. Possible values of the format parameter: a-NUL-paddedstringA-SPACE-paddedstringh-Hexstring, lownibblefirth-Hexstring, highnibblefirstc-signedcharC-unsignedchars-s format. possible values:
A-NUL-padded string
A-SPACE-padded string
H-Hex string, low nibble first
H-Hex string, high nibble first
C-signed char
C-unsigned char
S-signed short (always 16 bit, machine byte order)
S-unsigned short (always 16 bit, machine byte order)
N-unsigned short (always 16 bit, big endian byte order)
V-unsigned short (always 16 bit, little endian byte order)
I-signed integer (machine dependent size and byte order)
I-unsigned integer (machine dependent size and byte order)
L-signed long (always 32 bit, machine byte order)
L-unsigned long (always 32 bit, machine byte order)
N-unsigned long (always 32 bit, big endian byte order)
V-unsigned long (always 32 bit, little endian byte order)
F-float (machine dependent size and representation)
D-double (machine dependent size and representation)
X-NUL byte
X-Back up one byte
@-NUL-fill to absolute position
A is a null byte string.
A is A byte string filled with spaces.
B is a single-byte string in ascending order.
B is a single-byte string. the bits in each byte are sorted in descending order.
C is a signed char (8-digit integer) value.
C is an unsigned char (8-digit integer) value. for Unicode, see U
D. double-precision floating point number in local format
F single-precision floating point number in local format
H: a hexadecimal string with four lower digits in front
H: a hexadecimal string with four digits in front
I a signed integer in the local format
I an unsigned integer in the local format
L a signed long integer, always 32-bit
L An unsigned long integer, always 32-bit
N a 16-bit short integer, "network" in byte order (front of the big head)
N a 32-bit short integer, "network" in byte order (front of the big head)
P a pointer to a null string
P a pointer to a fixed-length string
Q: A signed value of four times (64-bit integer)
Q: an unsigned four times (64-bit integer) value
S a signed Short integer value, always 16 bits
S is an unsigned short integer value, which is always 16 bits. the byte order is related to the machine chip.
U a non-encoded string
U a Unicode character number
VA 16-bit short integer in the byte order of "VAX" (before the small header)
Vone is a 32-bit short integer in the byte order of "VAX" (before the small header ).
W: an integer compressed by a BER
X is an empty byte (ignore one byte forward)
X back up one byte
Z: An empty ending (and an empty-filled) byte string
Rules:
1. each letter can be followed by a number, indicating count. if count is a *, it indicates all the remaining items.
2. if you provide fewer parameters than $ format, pack assumes that all parameters are missing are null values. If you provide more parameters than $ format, extra parameters are ignored.

Possible values for the http://www.bkjia.com/PHPjc/320732.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/320732.htmlTechArticleformat parameter: a-NUL-padded string A-SPACE-padded string h-Hex string, low nibble first H-Hex string, high nibble first c-signed char C-unsigned char s-s...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.