--- プログラム ---

BEGIN{

a="123456789"
print a
print length(a)
print substr(a,3)
print substr(a,3,2)
print index(a,"56")
print substr(a,index(a,"56"))
print substr(a,index(a,"56"),2)
gsub("456","abc",a)
print a
a=substr(a, 1, length(a)-1)
print a
}


--- 実行結果 ---

123456789
9
3456789
34
5
56789
56
123abc789
123abc78






戻る