zoukankan      html  css  js  c++  java
  • X++中的subStr

    新手上路:

    X++中的subStr: Retrieves part of a string

    str subStr(str _text, int _position, int _number)

    和平常我们用的SubString 不一样的是,_number 参数允许负数, 当_number < 0 时,表示从_position位置开始倒推几位.

    Example:

    // Returns the text string CDEFG.
    subStr("ABCDEFGHIJ",3,5);
    // Returns the text string DEFG.
    subStr("ABCDEFGHIJ",7,-4);

    Parameter

    Description

    _text

    The original string.

    _position

    The position in _text to begin the new string.

    _number

    The number of characters to select from _position onwards.

    If there is a minus sign preceding _number, the system selects the substring backward from the specified position.

  • 相关阅读:
    第十四周作业
    十二
    第十一周作业
    第十周作业
    第八周作业
    第七周
    软件工程作业2
    自我介绍
    2019春总结作业
    2019春第一次课程设计实验报告
  • 原文地址:https://www.cnblogs.com/aot/p/1888022.html
Copyright © 2011-2022 走看看