当前位置:网站首页>Definition and method of string
Definition and method of string
2022-07-04 11:07:00 【It's a cinch!】
Define methods :
s=str()
s=''
s=""
s=""""""
capitalize—— Returns the uppercase of the first character of a string Variable .capitalize()
title—— Converts a string to a title and returns Variable .title()
rlowe—— Converts a string to a lowercase string and returns Variable .capitalize()
upper—— Converts a string to an uppercase string and returns Variable .capitalize()
istitle—— Determine whether the string is a title Variable .capitalize()
islower—— Determine whether the string is all lowercase Variable .capitalize()
isupper—— Determine whether the string is all uppercase Variable .capitalize()
isalpha—— Determine whether the string is all alphabetic Variable .isalpha()
isdigit—— Determine whether the string is all numbers Variable .isdigit()
isspace—— Judge whether the string is all spaces Variable .isspace()
isanlum—— Determine whether the string is a valid character Variable .isanlum()
center—— According to the length of the string ( Must be greater than the length of the string itself , The unit is the sign bit ) To center ,fillchar( Optional parameters ) Default is space Variable .center(width[,fallchar('')],/)
count—— Count the number of characters Variable .count('*' | "**")
endswith—— Determine whether the string is based on '*** For the end Variable .endswith('**')
startswith—— Determine whether the string is based on '***' Start Variable .startswith('**')
find—— Find the first occurrence of a character or string , If there is no return -1 Variable .find('**')
rfind—— Find the position of the first occurrence of a character or string from right to left , If there is no return -1 Variable .rfind('**')
index—— Find the first position of the character or string from left to right , If it doesn't exist, an error will be reported Variable .index('**')
rindex—— Find the first position of the character or string from right to left , If it doesn't exist, an error will be reported Variable .rindex('**')
encode—— Convert string to byte (byte) Methods (python3) Variable .encode('**')
①:1 byte (byte) = 8 position (bit)
②: stay 16 Bit system ( such as 8086 microcomputer ) 1 word (word)= 2 byte (byte)= 16(bit)
stay 32 Bit system ( such as win32) 1 word (word)= 4 byte (byte)=32(bit)
stay 64 Bit system ( such as win64)1 word (word)= 8 byte (byte)=64(bit)
*decode—— Byte (byte) Methods to convert to strings

边栏推荐
- Network connection (II) three handshakes, four waves, socket essence, packaging of network packets, TCP header, IP header, ACK confirmation, sliding window, results of network packets, working mode of
- Personal thoughts on the development of game automation protocol testing tool
- QQ set group information
- XMIND installation
- iptables导致Heartbeat脑裂
- Canoe the second simulation engineering xvehicle 3 CAPL programming (operation)
- 三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
- LVS+Keepalived实现四层负载及高可用
- Test question bank management system - database design [easy to understand]
- [Galaxy Kirin V10] [server] soft RAID configuration
猜你喜欢

JMeter correlation technology

MFC document view framework (relationship between classes)

Canoe - the third simulation project - bus simulation - 3-1 project implementation

Personal thoughts on the development of game automation protocol testing tool

Unittest+airtest+beatiulreport combine the three to make a beautiful test report

Installation of ES plug-in in Google browser

Send a request using paste raw text

Using Lua to realize 99 multiplication table

2022 AAAI fellow release! Yan Shuicheng, chief scientist of sail, and Feng Yan, Professor of Hong Kong University of science and technology, were selected

Appscan installation error: unable to install from Net runtime security policy logout appscan solution
随机推荐
Software testing related resources
Function introduction of canbedded component
Jemeter script recording
DNS hijacking
The most ideal automated testing model, how to achieve layering of automated testing
[Galaxy Kirin V10] [server] iSCSI deployment
Safety testing aspects
[test theory] test process management
Learning XML DOM -- a typical model for parsing XML documents
本地Mysql忘记密码的修改方法(windows)[通俗易懂]
Dictionaries and collections
Solaris 10网络服务
三立期货安全么?期货开户怎么开?目前期货手续费怎么降低?
Introduction to Lichuang EDA
Strings and characters
Customized version of cacti host template
Post man JSON script version conversion
[Galaxy Kirin V10] [server] NFS setup
Understanding of object
Local MySQL forget password modification method (Windows) [easy to understand]