Menu

#451 add "contains" method to String Class

5.0.0
closed
Classes (154)
none
5
2023-01-01
2012-05-08
Anonymous
No

over and over again, simple tests to find out whether a needle is contained in a haystack are performed in code, in the following fashion:
IF haystack~pos(needle) > 0 THEN, or
IF haystack~wordPos(needle) > 0 THEN, etc....

A string method "contains" would greatly enhance code readability and follow the human centric philosophy of rexx. The aboce code would look like

IF haystack~contains(needle) THEN, or
IF haystack~containsWord(needle) THEN, etc....

Madou

Discussion

  • Rick McGuire

    Rick McGuire - 2013-11-20
    • Pending work items: --> none
    • Milestone: None --> v4.2.0
     
  • Rick McGuire

    Rick McGuire - 2013-11-22
    • Milestone: v4.2.0 --> None
     
  • Rick McGuire

    Rick McGuire - 2014-06-16
    • status: open --> accepted
    • assigned_to: Rick McGuire
    • Pending work items: none --> code+doc+test
     
  • Rick McGuire

    Rick McGuire - 2014-06-16

    Committed revision [r10205].
    This added contains and caselessContains to String and MutableBuffer. The starting position and search range can be specified with this functions. Word versions will be committed separately.

     

    Related

    Commit: [r10205]

  • Rick McGuire

    Rick McGuire - 2014-06-16

    Committed [r10207]
    Adds containsWord and caselessContainsWord to String and MutableBuffer.

     

    Related

    Commit: [r10207]

  • Rick McGuire

    Rick McGuire - 2014-06-16
    • Pending work items: code+doc+test --> doc+test
     
  • Rick McGuire

    Rick McGuire - 2014-09-25
    • Milestone: None --> 5.0.0
     
  • Rick McGuire

    Rick McGuire - 2014-10-13
    • Pending work items: doc+test --> doc
     
  • Erich

    Erich - 2015-06-12

    Documented contains() / caselessContains() for MutableBuffer in revision [r10933].
    String to follow.

     

    Related

    Commit: [r10933]

  • Erich

    Erich - 2015-10-12

    Committed revision [r10970] for String.

     

    Related

    Commit: [r10970]

  • Erich

    Erich - 2015-10-12
    • Pending work items: doc --> none
     
  • Erich

    Erich - 2015-10-18
    • status: accepted --> pending
     
  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel