// String Replace function FuncMethod ReplaceFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "Replace", Documentation = "Results in a String Value. This String Value will be built from the specified String Value, where all occurrences of the pattern String are replaced with the replacement String.", ReturnType = supplier.String(), Parameters = new CodeParameter[] { new CodeParameter("pattern", "The String pattern to be replaced.", supplier.String()), new CodeParameter("replacement", "The String Value in which to replace the pattern String.", supplier.String()) }, Action = (actionSet, methodCall) => Element.Part("String Replace", actionSet.CurrentObject, methodCall.Get(0), methodCall.Get(1)) };
// String Slice function FuncMethod IndexOfFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "IndexOf", Documentation = "The index of a character within a String or -1 of no such character can be found.", ReturnType = supplier.Number(), Parameters = new CodeParameter[] { new CodeParameter("character", "The character for which to search.", supplier.String()), }, Action = (actionSet, methodCall) => Element.Part("Index Of String Char", actionSet.CurrentObject, methodCall.Get(0)) };
// String Slice function FuncMethod CharInStringFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "CharAt", Documentation = "The character found at a specified index of a String.", ReturnType = supplier.String(), Parameters = new CodeParameter[] { new CodeParameter("index", "The index of the character.", supplier.Number()), }, Action = (actionSet, methodCall) => Element.Part("Char In String", actionSet.CurrentObject, methodCall.Get(0)) };
// String Split function FuncMethod SplitFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "Split", Documentation = "Results in an Array of String Values. These String Values will be built from the specified String Value, split around the seperator String.", ReturnType = supplier.Array(supplier.String()), Parameters = new CodeParameter[] { new CodeParameter("seperator", "The seperator String with which to split the String Value.", supplier.String()), }, Action = (actionSet, methodCall) => Element.Part("String Split", actionSet.CurrentObject, methodCall.Get(0)) };
// String Slice function FuncMethod SliceFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "Slice", Documentation = "Gets a substring from the string by a specified length.", ReturnType = supplier.String(), Parameters = new CodeParameter[] { new CodeParameter("start", "The starting index of the substring.", supplier.Number()), new CodeParameter("length", "The length of the substring.", supplier.Number()) }, Action = (actionSet, methodCall) => Element.Part("String Slice", actionSet.CurrentObject, methodCall.Get(0), methodCall.Get(1)) };
public ConstStringParameter(string name, string documentation, ITypeSupplier typeSupplier) : base(name, documentation, typeSupplier.String()) { }
// String Contains function FuncMethod ContainsFunction(ITypeSupplier supplier) => new FuncMethodBuilder() { Name = "Contains", Documentation = "Determines if the string contains the specified value.", ReturnType = supplier.Boolean(), Parameters = new CodeParameter[] { new CodeParameter("value", "The substring that will be searched for.", supplier.String()) }, Action = (actionSet, methodCall) => Element.Part("String Contains", actionSet.CurrentObject, methodCall.Get(0)) };