using System; using System.Diagnostics; using System.Text; using System.Collections; using System.Collections.Generic; class Test { public delegate void deltest(string str); public static void Callbk(string str) { Console.WriteLine(str); } static voi
窗体设计: 代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsAppl
""" Python3.4[文本]之每次处理一个字符 """ test_str = "my name is bixiaopeng" for x in range( 0, len(test_str)-1): print ("## 通过索引遍历字符串: " + test_str[x]) for x in test_str: print ("## 直接遍历字符串: " + x) thelist
VIM 用正则表达式 批量替换文本,多行删除,复制,移动 在VIM中 用正则表达式 批量替换文本,多行删除,复制,移动 :n1,n2 m n3 移动n1-n2行(包括n1,n2)到n3行之下: :n1,n2 co n3 复制n1-n2行(包括n1,n2)到n3行之下: :n1,n2 d 删除n1-n2行(包括n1,n2)行: vi替换使用规则: :g/s1/s/s2/s3/g 第一个g表示对每一个包括s1的行都进行替换,第二个g表示对每一行包括s1的行所有的s2都用s
python3.5 for循环每次取出一个字符(不是字节) #!/usr/bin/env python # -*- coding:utf-8 -*- my_str = "我是哈哈" for i in my_str: my_bytes = bytes(i, 'utf-8') print(my_bytes) my_bytes = bytes(i, 'gbk') print(my_bytes) for i in my_str: my_bytes = bytes(i, 'utf-8') for
/** * Created by xfyou on 2016/11/4. */ public class SubstringDemo { public static void main(String[] args) { String a = "Java is great."; System.out.println(a); System.out.println(a.substring(5)); System.out.println(a.substring(5, 7)); // Java的