🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# 组件源码 ``` /** * <b>方法描述:</b> 字符串拼接 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2018-04-25 15:51:00 <br/> * * @param target * 入参|目标字符串|{@link java.lang.String} * @param appendStr * 入参|追加字符串|{@link java.lang.String} * @param newStr * 出参|新字符串|{@link java.lang.String} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "字符串拼接", style = "判断型", type = "同步组件", comment = "将追加字符串拼接到目标字符的尾部,目标字符串为空,返回追加字符串", version = "1.0.0", deprecated = false, author = "admin", date = "2018-04-25 03:51:00") @InParams(param = { @Param(name = "target", comment = "目标字符串", type = java.lang.String.class), @Param(name = "appendStr", comment = "追加字符串", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "newStr", comment = "新字符串", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase P_append(String target, String appendStr) { if (StringUtil.isEmpty(target)) return ResultBase.newSuccessResult(appendStr); StringBuilder builder = new StringBuilder(target); builder.append(appendStr); return ResultBase.newSuccessResult(builder.toString()); } ``` # 交易中组件使用方式 ![](https://img.kancloud.cn/08/34/0834a35ba992bfa3d6a5c9d452a9681d_1867x891.png) # 参数说明及示例 ## 入口参数 目标字符串:输入一串字符串:示例: `"你好"` 追加字符串输入一串字符串:示例: `"世界"` ## 出口参数 新字符串:拼接后的字符串,示例: `__INNER__["result"]`