block_string.json 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. [
  2. {
  3. "name": "string.new",
  4. "contents": [
  5. "新建一个字符串",
  6. {"type": "input","default": ""}
  7. ],
  8. "class": "string.New", "extend": "$Expression"
  9. },
  10. {
  11. "name": "string.indexOf",
  12. "contents": [
  13. "字符串",
  14. {"type": "inputMortise","default": "","tenonTypes": []},
  15. "中出现子字符串",
  16. {"type": "inputMortise","default": "","tenonTypes": []},
  17. "的位置"
  18. ],
  19. "class": "string.IndexOf", "extend": "$Expression"
  20. },
  21. {
  22. "name": "string.lastIndexOf",
  23. "contents": [
  24. "字符串",
  25. {"type": "inputMortise","default": "","tenonTypes": []},
  26. "中出现子字符串",
  27. {"type": "inputMortise","default": "","tenonTypes": []},
  28. "的最后位置"
  29. ],
  30. "class": "string.LastIndexOf", "extend": "$Expression"
  31. },
  32. {
  33. "name": "string.includes",
  34. "contents": [
  35. "字符串",
  36. {"type": "inputMortise","default": "","tenonTypes": []},
  37. "中是否包含子字符串",
  38. {"type": "inputMortise","default": "","tenonTypes": []},
  39. "的最后位置"
  40. ],
  41. "class": "string.Includes", "extend": "$Expression"
  42. },
  43. {
  44. "name": "string.concat",
  45. "contents": [
  46. "连接字符串",
  47. {"type": "inputMortise","default": "","tenonTypes": []},
  48. ",",
  49. {"type": "inputMortise","default": "","tenonTypes": []}
  50. ],
  51. "class": "string.Concat", "extend": "$Expression"
  52. },
  53. {
  54. "name": "string.split",
  55. "contents": [
  56. "分割字符串",
  57. {"type": "inputMortise","default": "","tenonTypes": []},
  58. "分隔符",
  59. {"type": "inputMortise","default": "","tenonTypes": []}
  60. ],
  61. "class": "string.Split", "extend": "$Expression"
  62. },
  63. {
  64. "name": "string.slice",
  65. "contents": [
  66. "截取",
  67. {"type": "select", "options": ["slice", "substr", "substring"], "default": "slice"},
  68. "字符串",
  69. {"type": "inputMortise","default": "","tenonTypes": []},
  70. "从",
  71. {"type": "inputMortise","default": "","tenonTypes": []},
  72. "到",
  73. {"type": "inputMortise","default": "","tenonTypes": []}
  74. ],
  75. "class": "string.Slice", "extend": "$Expression"
  76. },
  77. {
  78. "name": "string.replace",
  79. "contents": [
  80. "字符串",
  81. {"type": "inputMortise","default": "","tenonTypes": []},
  82. "将子字符串",
  83. {"type": "inputMortise","default": "","tenonTypes": []},
  84. "替换为",
  85. {"type": "inputMortise","default": "","tenonTypes": []}
  86. ],
  87. "class": "string.Replace", "extend": "$Expression"
  88. },
  89. {
  90. "name": "string.toCase",
  91. "contents": [
  92. "将字符串",
  93. {"type": "inputMortise","default": "","tenonTypes": []},
  94. "转换为",
  95. {"type": "select", "options": ["小写|toLowerCase", "大写|toUpperCase"], "default": "slice"},
  96. ],
  97. "class": "string.ToCase", "extend": "$Expression"
  98. },
  99. {
  100. "name": "string.trim",
  101. "contents": [
  102. "将字符串",
  103. {"type": "inputMortise","default": "","tenonTypes": []},
  104. "两端去空"
  105. ],
  106. "class": "string.Trim", "extend": "$Expression"
  107. },
  108. {
  109. "name": "string.uniqueID",
  110. "contents": ["唯一ID"],
  111. "class": "string.UniqueID", "extend": "$Expression"
  112. },
  113. {
  114. "name": "string.clean",
  115. "contents": [
  116. "去除字符串",
  117. {"type": "inputMortise","default": "","tenonTypes": []},
  118. "的多余空格"
  119. ],
  120. "class": "string.Clean", "extend": "$Expression"
  121. },
  122. {
  123. "name": "string.capitalize",
  124. "contents": [
  125. "将字符串",
  126. {"type": "inputMortise","default": "","tenonTypes": []},
  127. "首字母大写"
  128. ],
  129. "class": "string.Capitalize", "extend": "$Expression"
  130. },
  131. {
  132. "name": "string.toInt",
  133. "contents": [
  134. "将字符串",
  135. {"type": "inputMortise","default": "","tenonTypes": []},
  136. "转换为整数"
  137. ],
  138. "class": "string.ToInt", "extend": "$Expression"
  139. },
  140. {
  141. "name": "string.toFloat",
  142. "contents": [
  143. "将字符串",
  144. {"type": "inputMortise","default": "","tenonTypes": []},
  145. "转换为浮点数"
  146. ],
  147. "class": "string.ToFloat", "extend": "$Expression"
  148. },
  149. {
  150. "name": "string.charAt",
  151. "contents": [
  152. "字符串",
  153. {"type": "inputMortise","default": "","tenonTypes": []},
  154. "中的字符",
  155. {"type": "select", "options": ["charAt", "charCodeAt", "codePointAt"], "default": "charAt"},
  156. "位置",
  157. {"type": "inputMortise","default": "","tenonTypes": []}
  158. ],
  159. "class": "string.CharAt", "extend": "$Expression"
  160. },
  161. {
  162. "name": "string.startEndWith",
  163. "contents": [
  164. "子字符串",
  165. {"type": "inputMortise","default": "","tenonTypes": []},
  166. "在字符串",
  167. {"type": "inputMortise","default": "","tenonTypes": []},
  168. "的",
  169. {"type": "select", "options": ["开头|startsWith", "结尾|endsWith"], "default": "startsWith"}
  170. ],
  171. "class": "string.StartEndWith", "extend": "$Expression"
  172. },
  173. {
  174. "name": "string.match",
  175. "contents": [
  176. "字符串",
  177. {"type": "inputMortise","default": "","tenonTypes": []},
  178. "匹配正则表达式",
  179. {"type": "inputMortise","default": "","tenonTypes": []}
  180. ],
  181. "class": "string.Match", "extend": "$Expression"
  182. }
  183. ]