All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ndviet.keyword.StringUtils Maven / Gradle / Ivy

package com.ndviet.keyword;

import com.ndviet.library.string.StringHelpers;
import org.robotframework.javalib.annotation.ArgumentNames;
import org.robotframework.javalib.annotation.RobotKeyword;
import org.robotframework.javalib.annotation.RobotKeywords;
import org.robotframework.javalib.library.AnnotationLibrary;

import java.util.Arrays;
import java.util.List;

@RobotKeywords
public class StringUtils extends AnnotationLibrary {
    public StringUtils() {
        super(Arrays.asList("com/ndviet/keyword/StringUtils.class"));
    }

    @RobotKeyword
    @ArgumentNames({"input", "regex", "replace"})
    public static String replaceStringUsingRegex(String input, String regex, String replace) {
        return StringHelpers.replaceStringUsingRegex(input, regex, replace);
    }

    @RobotKeyword
    @ArgumentNames({"input", "regex", "replace"})
    public static List replaceListStringUsingRegex(List listInput, String regex, String replace) {
        return StringHelpers.replaceListStringUsingRegex(listInput, regex, replace);
    }

    @RobotKeyword
    @ArgumentNames({"input", "regex"})
    public static String getStringMatchesRegex(String input, String regex) {
        return StringHelpers.getStringMatchesRegex(input, regex);
    }

    @RobotKeyword
    @ArgumentNames({"input", "regex"})
    public static List getListStringMatchesRegex(String input, String regex) {
        return StringHelpers.getListStringMatchesRegex(input, regex);
    }

    @RobotKeyword
    @ArgumentNames({"input", "regex"})
    public static List getListStringMatchesListRegex(String input, List listRegex) {
        return StringHelpers.getListStringMatchesListRegex(input, listRegex);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy