QuaScript DocumentationLanguage guide, engine API, 601 builtins and the preset library · v3.0.0-phase1 str: textGenerated from the engine catalog by tools/gen-docs.mjs; do not edit.str.ends_withscript.qsstr.ends_with(s, suffix) -> boolTrue when s ends with suffix.ArgumentKindDefaultNotesstextrequiredsuffixtextrequiredstr.findscript.qsstr.find(s, sub) -> intPosition of sub, or -1.ArgumentKindDefaultNotesstextrequiredsubtextrequiredstr.formatscript.qsstr.format(pattern) -> textFills {} / {:.2f} / {:,} / {:+.1f} / {:.0%} placeholders in order.ArgumentKindDefaultNotespatterntextrequiredstr.hasscript.qsstr.has(s, sub) -> boolTrue when sub occurs in s.ArgumentKindDefaultNotesstextrequiredsubtextrequiredstr.joinscript.qsstr.join(l, sep) -> textJoins a list into text.ArgumentKindDefaultNotesllist<any>requiredseptextrequiredstr.lenscript.qsstr.len(s) -> intLength in bytes.ArgumentKindDefaultNotesstextrequiredstr.lowerscript.qsstr.lower(s) -> textLower case.ArgumentKindDefaultNotesstextrequiredstr.ofscript.qsstr.of(x, format = ) -> textText of a value; format like ".2f", ",", ".1%".ArgumentKindDefaultNotesxanyrequiredformattext""str.padscript.qsstr.pad(s, width, fill = , left = 1) -> textPads to width.ArgumentKindDefaultNotesstextrequiredwidthintrequiredfilltext leftbool1str.parsescript.qsstr.parse(s) -> numNumber from text (na if not a number).ArgumentKindDefaultNotesstextrequiredstr.repeatscript.qsstr.repeat(s, n) -> texts repeated n times.ArgumentKindDefaultNotesstextrequirednintrequiredstr.replacescript.qsstr.replace(s, old, new, all = 1) -> textReplaces occurrences of old.ArgumentKindDefaultNotesstextrequiredoldtextrequirednewtextrequiredallbool1str.slicescript.qsstr.slice(s, start, end = na) -> textSubstring [start, end); negative positions count from the end.ArgumentKindDefaultNotesstextrequiredstartintrequiredendintnastr.splitscript.qsstr.split(s, sep) -> list<text>List of the parts between separators.ArgumentKindDefaultNotesstextrequiredseptextrequiredstr.starts_withscript.qsstr.starts_with(s, prefix) -> boolTrue when s starts with prefix.ArgumentKindDefaultNotesstextrequiredprefixtextrequiredstr.trimscript.qsstr.trim(s) -> textWithout leading and trailing spaces.ArgumentKindDefaultNotesstextrequiredstr.upperscript.qsstr.upper(s) -> textUpper case.ArgumentKindDefaultNotesstextrequired← tableparam: settings →All 81 chaptersGuideGetting startedScript headersLanguage basicsFunctionsStructs, enums and traitsLibrariesParametersRenderingColorsDrawingsCollectionsTime, sessions and dataStrategiesBotsExecution modelBuilding complex analysesAdvancedChart styles by exampleEngineEngine APIPerformanceDiagnosticsReferenceta: technical analysisstat: statisticsmathcolorrender: outputsdraw: drawing objectsarraylistmapgridtablestr: textparam: settingsbarassetintervaltimesessionfeed: other intervalsalertorderexitpositionportfolioriskbook: order book (host data)orderbook (host data)derivative (host data)financial (host data)option pricinganchorshapestyleraysidepanechartaccounthftPresetsEvery chartGalleryLanguage showcasesbookFundamentals and flowsWebGPU StudioMicrostructureTrendlines and levelsMoving averagesMomentumMultiple intervalsLayoutsMarket structureStatisticsTrendVolatilityVolumeVertical panesBotsChart stylesLibrariesStrategies