💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 组件源码 ``` /** * @category 字符串分割 * @param instr * 入参|原字符串|{@link java.lang.String} * @param spltr * 入参|分割符|{@link java.lang.String} * @param retstrs * 出参|返回字符串|{@link JavaList} * @return 1 成功<br/> */ @InParams(param = { @Param(name = "instr", comment = "原字符串", type = java.lang.String.class), @Param(name = "spltr", comment = "分割符", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "retstrs", comment = "返回字符串", type = JavaList.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) @Component(label = "字符串切割", style = "处理型", type = "同步组件", comment = "split调用,用分隔符将输入字符串分割成字符串数组", version = "1.0.0", deprecated = false, author = "test", date = "2018-01-16 11:37:14") public static ResultBase P_split(String instr, String spltr) { if (instr == null || instr == "" || spltr == null || spltr == "") { return ResultBase.newFailureResult("TPTS1001", "输入参数不能为空"); } return ResultBase.newSuccessResult(new JavaList(instr.split(spltr))); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/95/10/95106057ff3242a8bbb2440ea639cbc0_1870x893.png) # 参数说明及示例 ## 入口参数 原字符串:输入字符串,示例: `"123,456,798"` 分割符:分隔符将输入字符串分割成字符串数组,示例: `","` ## 出口参数 返回字符串:字符串数组,示例: `__INNER__["result"]`