
- Rexx 教程
- Rexx - 首頁
- Rexx - 概述
- Rexx - 環境
- Rexx - 安裝
- Rexx - 外掛安裝
- Rexx - 基本語法
- Rexx - 資料型別
- Rexx - 變數
- Rexx - 運算子
- Rexx - 陣列
- Rexx - 迴圈
- Rexx - 決策
- Rexx - 數字
- Rexx - 字串
- Rexx - 函式
- Rexx - 堆疊
- Rexx - 檔案 I/O
- Rexx - 檔案函式
- Rexx - 子程式
- Rexx - 內建函式
- Rexx - 系統命令
- Rexx - XML
- Rexx - Regina
- Rexx - 解析
- Rexx - 訊號
- Rexx - 除錯
- Rexx - 錯誤處理
- Rexx - 面向物件
- Rexx - 可移植性
- Rexx - 擴充套件函式
- Rexx - 指令
- Rexx - 實現
- Rexx - Netrexx
- Rexx - Brexx
- Rexx - 資料庫
- 手持式和嵌入式
- Rexx - 效能
- Rexx - 最佳程式設計實踐
- Rexx - 圖形使用者介面
- Rexx - Reginald
- Rexx - Web程式設計
- Rexx 有用資源
- Rexx - 快速指南
- Rexx - 有用資源
- Rexx - 討論
Rexx - 字串
Rexx 中的字串由一系列字元表示。以下程式是字串的示例:
/* Main program */ a = "This is a string" say a
上述程式的輸出如下:
This is a string
讓我們討論一些 Rexx 中可用於字串的方法。
序號 | Rexx 中可用的字串方法 |
---|---|
1 | left
此方法返回字串左側的特定數量的字元。 |
2 | right
此方法返回字串右側的特定數量的字元。 |
3 | length
此方法返回字串中的字元數。 |
4 | reverse
此方法以反向格式返回字元。 |
5 | compare
此方法比較兩個字串。如果“string1”和“string2”相同,則返回“0”。否則,它返回第一個不匹配字元的位置。 |
6 | copies
此方法複製字串 n 次。 |
7 | substr
此方法從特定字串中獲取子字串。 |
8 | pos
此方法返回一個字串在另一個字串中的位置。 |
9 | delstr
此方法從字串中刪除子字串。 |
廣告