# strings > Package strings. Search, trim, case, split and join on `str`. The package cannot be named `str` because that token is the type — the same reason Go calls its own `strings`. ```slang import "strings"; strings.find("hello world", "world"); // 6, or -1 strings.rfind("a/b/c", "/"); // 3 strings.contains("hello", "ell"); strings.has_prefix("hello", "he"); strings.has_suffix("hello", "lo"); strings.count("a,b,c", ","); // 2 strings.trim(" hi \r\n"); // "hi" (space/tab/CR/LF) strings.trim_start(s); strings.trim_end(s); strings.to_upper("hi"); strings.to_lower("HI"); // ASCII only strings.slice("hello", 1, 3); // "el" strings.slice("hello", -3, 5); // "llo" — negative counts back strings.repeat("ab", 3); // "ababab" strings.replace("a,b,c", ",", " | "); strings.split("a,b,,c", ","); // ["a", "b", "", "c"] strings.join(parts, ","); // the inverse of split strings.join_bytes(parts, b","); // the same for [bytes]: sized once, copied once strings.from_float(0.1 + 0.2); // "0.30000000000000004" strings.escape_html(""); // "<a href='x'>" strings.escape_js("it's "); // "it\u0027s \u003c/script\u003e" ``` `escape_html` writes `& < > " '` as character references, which is safe in text and in a quoted attribute of either quote. `escape_js` makes the inside of a JavaScript string literal of any quote (`'`, `"` or a backquote), safe inside `