inner code of an English character is an 8-bit ASCII code with a maximum value of 0. In order not to conflict with the 7-bit ASCII code, the maximum bit of each byte of the Country Code is changed from 0 to 1, and the rest of the encoding remains unchanged as the internal
: constant All caps One word: Uppercase Example: PI Multiple words: Uppercase and separated by _ Example: Student_max_age 3: note (master)(1) The text that explains the program(2) Classification:A: Single-line comment//B: Multiline Comment/**/C: Documentation Comments (later)/** */(3) wrote a annotated version of the HelloWorld case.We're going to write a procedure in the back.Demand:Analysis:Realize:The code reflects:(4) The role of annotationsA
) intercept string
$str the string to intercept
Where do $start start the interception?
How long does the $length intercept?
Encoding used by $encoding
In fact, these 2 functions and strlen (), substr () very much like, the only difference is that you can set the encoding.
Bottom up Example:
PHP/**/$str = ' aa12 ah aa '; Echo strlen ($str// Direct output length is 9//output length is 7, why is 7? Note that after setting the code, whether it
age = 0xf;4.16 Binary0 1 2 3 4 5 6 7 8 9 a B c D E F10 11 12 13 14 1541 (16) = 4 * 16 +1 = 65 (10)4 10100 0001 (2) = 65 (10)* The 16 binary is used as a shorthand for the 2 binary.4e2d (16) =0100 1110 0010 1101 (2)5. Eight binary is a shorthand for binary, 3-bit corresponding conversion 3. Original
very intuitive.We will then create a way to judge which countries in the permanent membership are English-speaking countries. Public Static stringCanspeakenglish (pfive p5) {if(((Pfive.usa | pfive.uk) P5) = =p5) { returnP5. ToString () +"Is a 中文版 country."; } Else { returnP5. ToString () +"is not a 中文版 country."; } }Here we focus on the code
following [{1}] is repeated once.The second half is \ 2, which is to reference two groups. The following [{2}] is repeated once.The translation of the English blog is as follows:The expression [^ (. *) \ 1 {16} (. *) \ 2 {11} $] of the binary equation 17x + 12y = 51 ]. It's easy to understand. [(. *)] Is a number ranging from 0 to countless. (This is followed by the above. In fact, [.] point number indicat
once.The second half is \ 2, which is to reference two groups. The following [{2}] is repeated once.The translation of the English blog is as follows:The expression [^ (. *) \ 1 {16} (. *) \ 2 {11} $] of the binary equation 17x + 12y = 51 ]. It's easy to understand. [(. *)] Is a number ranging from 0 to countless. (This is followed by the above. In fact, [.] point number indicates the character "1 ")That i
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.