Tag:string

  • Detailed explanation of insert() function in C + + string

    Time:2021-6-14

    The following code to introduce C++   String insert() function, the details are as follows: basic_string& insert (size_type pos, const basic_string& str); Insert the string STR before the character marked POS in the original string basic_string& insert (size_type pos, const basic_string& str, size_type pos1, size_type n); The n characters of STR starting from the subscript […]

  • KMP

    Time:2021-5-8

    Basic concepts Intuitive understanding of match function 1. The match array records where we need to return to the pattern in case of mismatch 2. The function match (J) can be expressed as When the pointer points to p [J] (not including the whole string itself) fromHead startA substring and a segment ofEnd at P […]

  • Analysis of JS data type string using examples

    Time:2021-5-2

    This article mainly introduces the JS data type string use example analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Convert to string var num = 10 num.toString(); //” 10 “to string – the parameter represents a string […]

  • Tkinter (12) message unit

    Time:2021-4-28

    Creation of message parts and their options Similar to label components, mainly used to display multiple lines of the same font message import tkinter as tk parent = tk.Tk() message = tk.Message(parent, option, …) option explain aspect The percentage of degree relative to height is 150 bg or background background color bd or borderwidth If […]

  • Bash tips 03: the importance of double quotes

    Time:2021-4-23

    Suppose in a bash script, the functionfooIt is defined as follows: function foo { echo “>> $1 …” echo “>> $2 …” } Call foo: foo “” “test” That is, empty strings and”test”Call for parameter valuefooThe results are as follows >>> … >>> test … Now let’s say there’s a functionbar, which is defined as […]

  • Linux learning notes — environment variables and file search

    Time:2021-3-18

    Environment variable and file search Shell variable Symbols used to record a value (not necessarily a numerical value, but also a character or string) in a computer, and these symbols will be used in different operations. The scope of a variable is the effective range of a variable (such as a function, a source file, […]

  • [Zhuan]: using regularization to realize matching and replacement

    Time:2021-1-9

    Tbox encapsulates three regular libraries (PCRE / pcre2 / POSIX) to achieve unified interface and cross platform processing. As long as xmake automatically detects one of the libraries when compiling and configuring, it can be used. Generally, pcre2 is preferred. If you don’t want to rely too much on third-party libraries, you can switch to […]

  • Tkinter (34) radio button unit ttk.Radiobutton

    Time:2021-1-2

    Creation of TTK radio button part and its options w = ttk.Radiobutton(parent, option=value, …) option explain class_ Component classification name cannot be changed after creation command A program called when the state of a radio button component changes compound The position of the graph relative to the text when the graph is shared with the […]

  • The method of string replacing all specified strings in C + +

    Time:2020-11-19

    C + + string provides a replace method to replace strings. However, string does not implement the function of replacing all strings in a string. This is what we are going to do today. First of all, understand the concept that string replaces all strings, and all “12” of “12212” are replaced with “21”. What […]

  • Golang deals with JSON structures

    Time:2020-11-17

    First, let’s take a look at the JSON string { “resp”: { “respCode”: “000000”, “Respmsg”: success, “app”: { “appId”: “xxxxxx” } } } Go has built-in JSON string parsing package “encoding / JSON” Next, we need to define the structure. According to the analysis of the JSON library, eachCurly bracketsIt’s a structure The disassembled structure […]

  • Linux file view command

    Time:2020-10-18

    File view command     1. Cat: displays the contents of the file from the first line Usage: cat file or file path For example: cat ifcfg-eth0 or cat / etc / sysconfig / network scripts / ifcfg-eth0 Parameters: -A: The integration option equivalent to – vt can list some special characters instead of blanks; […]

  • New features to interpret | array range traversal function

    Time:2020-10-2

    Author: Yang TaotaoSenior database expert, specializing in MySQL for more than ten years. Good at mysql, PostgreSQL, mongodb and other open source database related backup recovery, SQL tuning, monitoring operation and maintenance, high availability architecture design, etc. At present, he works in akesheng, providing MySQL related technical support and MySQL related courses training for major […]