Jump to content

string trim question (Solved)


John117
 Share

Recommended Posts

hey if I have string

13215458Applesdfsdfsdfsd

6846465416Applesefsdfsdfsdfsdf

How would I code this to insure that the return is always apple?

And what if it was

465465464654

6565Apple56354654

54654646

And I only wanted it to be apple? btw this is an edit box value

Edited by Hatcheda
Link to comment
Share on other sites

hey if I have string

13215458Applesdfsdfsdfsd

6846465416Applesefsdfsdfsdfsdf

How would I code this to insure that the return is always apple?

And what if it was

465465464654

6565Apple56354654

54654646

And I only wanted it to be apple? btw this is an edit box value

If what you want is to return apple if the word apple is in the string then use

If StringInStr($string_to_search,"apple") then result = "apple"

Is that what you mean?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

If what you want is to return apple if the word apple is in the string then use

If StringInStr($string_to_search,"apple") then result = "apple"

Is that what you mean?

I thought of that, then I figured if he knew it was apple, then why would he want to "get" apple from the list...

Gues he wants to know if apple is in the list... :)

8)

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...