L scripting language String processing

Source: Internet
Author: User

String processing is one of the basic features of the programming language, and the string processing function of the scripting language is not weak.

The following script file is an example of some string processing

#scp
Definition: string, string1, "123456ABCDEFG"
Definition: String, string2, "ABC"
Definition: String, string3
Definitions: integers, length,0
Definitions: integers, pos,0

Take size: string, string2,length
Find: Strings, String1,string2,pos
Display: Length
Display: POS
Fetch SUBSTRING: string3,string1,pos,length
Display: String3

Convert: string3, uppercase
Display: String3
Conversion: string3, lowercase
Display: String3

Comparison: Strings, String2,string3
Capture: RET
If: ret==1, display: string equality
Otherwise: Display: strings are not equal

Convert: string3, invert
Display: String3

#分割字符串, generate a Table object with a list of split strings in the Table object
Definition: String, String4, "abc;123;456;789"
Definition: String, String5, ";"
Split: String, String4,string5,table1
Display: table1

Wait: User input, string1



interpreter engine Github Https://github.com/zhaoliangcn/LScript

L scripting language String processing

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.