index_of

Macro index_of 

Source
macro_rules! index_of {
    ($string:expr, $substring:expr) => { ... };
}
Expand description

Returns the index of the first occurrence of the substring (if no occurrence is found, returns -1)

ยงUsage

use we_cdk::*;

#[action]
fn _constructor() {
    let result: Integer = index_of!("Hello, world!", "world");
}