Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

String functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    String functions

    Hello,

    I need to check if a string is included inside other string.

    Which is the string function that does it?

    Thanks and regards.

    #2
    Originally posted by soyjesus View Post
    Hello,

    I need to check if a string is included inside other string.

    Which is the string function that does it?

    Thanks and regards.
    String.Contains().

    ref: https://msdn.microsoft.com/en-us/lib...(v=vs.90).aspx

    Comment


      #3
      Hello soyjesus,

      Thank you for writing in. If you just needed to know whether or not the string was contained within the other string you could use the String.Contains() method. For example:
      Code:
      string x = "I contain the word";
      string y = "word";
      Print(x.Contains(y)); //prints true
      If you have any other questions, please let me know.
      Michael M.NinjaTrader Quality Assurance

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      87 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      106 views
      0 likes
      Last Post CarlTrading  
      Working...
      X