CINXE.COM
Template:Str len/core - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="new" dir="ltr"> <head> <meta charset="UTF-8"> <title>Template:Str len/core - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )newwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["0\t1\t2\t3\t4\t5\t6\t7\t8\t9", "०\t१\t२\t३\t४\t५\t६\t७\t८\t९"],"wgDefaultDateFormat":"dmy","wgMonthNames":["","ज्यानुवरी","फेब्रुवरी","मार्च","अप्रिल","मे","जुन","जुलाई","अगस्ट","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर"],"wgRequestId":"fa8f824d-8221-404e-b590-0aa225becf37","wgCanonicalNamespace":"Template","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":10,"wgPageName":"Template:Str_len/core","wgTitle":"Str len/core","wgCurRevisionId":646475,"wgRevisionId":646475,"wgArticleId":189011,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["String manipulation templates"],"wgPageViewLanguage":"new","wgPageContentLanguage":"new","wgPageContentModel":"wikitext","wgRelevantPageName":"Template:Str_len/core","wgRelevantArticleId":189011,"wgIsProbablyEditable":true, "wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"new","pageLanguageDir":"ltr","pageVariantFallbacks":"new"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":3000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q11141746","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false, "wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns", "wikibase.client.vector-2022","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=new&modules=ext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=new&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=new&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Template:Str len/core - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//new.m.wikipedia.org/wiki/Template:Str_len/core"> <link rel="alternate" type="application/x-wiki" title="सम्पादन" href="/w/index.php?title=Template:Str_len/core&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (new)"> <link rel="EditURI" type="application/rsd+xml" href="//new.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://new.wikipedia.org/wiki/Template:Str_len/core"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.new"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-10 ns-subject mw-editable page-Template_Str_len_core rootpage-Template_Str_len skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> परिवहन </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/%E0%A4%AE%E0%A5%82_%E0%A4%AA%E0%A5%8C" title="Visit the main page [z]" accesskey="z"><span>मू पौ</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/%E0%A4%AA%E0%A4%B0%E0%A4%BF%E0%A4%AF%E0%A5%8B%E0%A4%9C%E0%A4%A8%E0%A4%BE:%E0%A4%B8%E0%A4%BE%E0%A4%AE%E0%A4%BE%E0%A4%9C%E0%A4%BF%E0%A4%95_%E0%A4%A6%E0%A4%AC%E0%A5%81" title="ज्याझ्वःया बारेय्, छिं छु यायेछिं, गन खँ सीकिगु"><span>सामाजिक दबू</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A4%BF%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:%E0%A4%9C%E0%A5%81%E0%A4%AF%E0%A4%BE%E0%A4%9A%E0%A5%8D%E0%A4%B5%E0%A4%81%E0%A4%97%E0%A5%81_%E0%A4%98%E0%A4%9F%E0%A4%A8%E0%A4%BE" title="जुयाच्वँगु घटनाया लिधँसा तथ्य मालादिसँ"><span>न्हूगु बुखँ</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:RecentChanges" title="थ्व विकिया न्हुगु हिलेज्याया धलः। [r]" accesskey="r"><span>न्हूगु हिलेज्या</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:Random" title="न्ह्याःगु छगू पौ क्यनादिसँ [x]" accesskey="x"><span>छपु च्वसु क्यनादिसँ</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/%E0%A4%97%E0%A5%8D%E0%A4%B5%E0%A4%BE%E0%A4%B9%E0%A4%BE%E0%A4%B2%E0%A4%BF:%E0%A4%A7%E0%A4%B2%E0%A4%AA%E0%A5%8C%E0%A4%83" title="खँ सीकिगु थाय्।"><span>ग्वाहालि</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/%E0%A4%AE%E0%A5%82_%E0%A4%AA%E0%A5%8C" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-new.svg" style="width: 7.5em; height: 1.75em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikipedia-tagline-new.svg" width="120" height="17" style="width: 7.5em; height: 1.0625em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="विकिपिडियाय् मालादिसं [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>मालादिसँ</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="विकिपिडियाय् मालादिसं [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="विशेष:Search"> </div> <button class="cdx-button cdx-search-input__end-button">थ्व खँग्वः</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="निजी ज्याभः"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_new.wikipedia.org&uselang=new" class=""><span>दान</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:CreateAccount&returnto=Template%3AStr+len%2Fcore" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:UserLogin&returnto=Template%3AStr+len%2Fcore" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="More options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="निजी ज्याभः" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">निजी ज्याभः</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_new.wikipedia.org&uselang=new"><span>दान</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:CreateAccount&returnto=Template%3AStr+len%2Fcore" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:UserLogin&returnto=Template%3AStr+len%2Fcore" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/%E0%A4%97%E0%A5%8D%E0%A4%B5%E0%A4%BE%E0%A4%B9%E0%A4%BE%E0%A4%B2%E0%A4%BF:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>थ्व IPया निंतिं खँल्हाबल्हा</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Beginning</div> </a> </li> <li id="toc-Technical_details" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Technical_details"> <div class="vector-toc-text"> <span class="vector-toc-numb">१</span> <span>Technical details</span> </div> </a> <button aria-controls="toc-Technical_details-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Toggle Technical details subsection</span> </button> <ul id="toc-Technical_details-sublist" class="vector-toc-list"> <li id="toc-About_((str_len))" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#About_((str_len))"> <div class="vector-toc-text"> <span class="vector-toc-numb">१.१</span> <span>About ((str len))</span> </div> </a> <ul id="toc-About_((str_len))-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-About_((str_len/core))" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#About_((str_len/core))"> <div class="vector-toc-text"> <span class="vector-toc-numb">१.२</span> <span>About ((str len/core))</span> </div> </a> <ul id="toc-About_((str_len/core))-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Search_trees_used" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Search_trees_used"> <div class="vector-toc-text"> <span class="vector-toc-numb">१.३</span> <span>Search trees used</span> </div> </a> <ul id="toc-Search_trees_used-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">२</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Template</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Str len/core</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in ५५ languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-55" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">५५ languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-als mw-list-item"><a href="https://als.wikipedia.org/wiki/Vorlage:Str_len/core" title="Vorlage:Str len/core – Alemannic" lang="gsw" hreflang="gsw" data-title="Vorlage:Str len/core" data-language-autonym="Alemannisch" data-language-local-name="Alemannic" class="interlanguage-link-target"><span>Alemannisch</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%82%D8%A7%D9%84%D8%A8:Str_len/core" title="قالب:Str len/core – Arabic" lang="ar" hreflang="ar" data-title="قالب:Str len/core" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-as mw-list-item"><a href="https://as.wikipedia.org/wiki/%E0%A6%B8%E0%A6%BE%E0%A6%81%E0%A6%9A:Str_len/core" title="সাঁচ:Str len/core – Assamese" lang="as" hreflang="as" data-title="সাঁচ:Str len/core" data-language-autonym="অসমীয়া" data-language-local-name="Assamese" class="interlanguage-link-target"><span>অসমীয়া</span></a></li><li class="interlanguage-link interwiki-azb mw-list-item"><a href="https://azb.wikipedia.org/wiki/%D8%B4%D8%A7%D8%A8%D9%84%D9%88%D9%86:Str_len/core" title="شابلون:Str len/core – South Azerbaijani" lang="azb" hreflang="azb" data-title="شابلون:Str len/core" data-language-autonym="تۆرکجه" data-language-local-name="South Azerbaijani" class="interlanguage-link-target"><span>تۆرکجه</span></a></li><li class="interlanguage-link interwiki-bar mw-list-item"><a href="https://bar.wikipedia.org/wiki/Vorlog:Str_len/core" title="Vorlog:Str len/core – Bavarian" lang="bar" hreflang="bar" data-title="Vorlog:Str len/core" data-language-autonym="Boarisch" data-language-local-name="Bavarian" class="interlanguage-link-target"><span>Boarisch</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Str_len/core" title="Шаблон:Str len/core – Belarusian" lang="be" hreflang="be" data-title="Шаблон:Str len/core" data-language-autonym="Беларуская" data-language-local-name="Belarusian" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/%C5%A0ablon:Niz_du%C5%BEina/sr%C5%BE" title="Šablon:Niz dužina/srž – Bosnian" lang="bs" hreflang="bs" data-title="Šablon:Niz dužina/srž" data-language-autonym="Bosanski" data-language-local-name="Bosnian" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D8%AF%D8%A7%DA%95%DB%8E%DA%98%DB%95:Str_len/core" title="داڕێژە:Str len/core – Central Kurdish" lang="ckb" hreflang="ckb" data-title="داڕێژە:Str len/core" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Str_len/core" title="Шаблон:Str len/core – Chuvash" lang="cv" hreflang="cv" data-title="Шаблон:Str len/core" data-language-autonym="Чӑвашла" data-language-local-name="Chuvash" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Vorlage:Str_len/core" title="Vorlage:Str len/core – German" lang="de" hreflang="de" data-title="Vorlage:Str len/core" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-diq mw-list-item"><a href="https://diq.wikipedia.org/wiki/%C5%9Eablon:Str_len/core" title="Şablon:Str len/core – Zazaki" lang="diq" hreflang="diq" data-title="Şablon:Str len/core" data-language-autonym="Zazaki" data-language-local-name="Zazaki" class="interlanguage-link-target"><span>Zazaki</span></a></li><li class="interlanguage-link interwiki-dsb mw-list-item"><a href="https://dsb.wikipedia.org/wiki/P%C5%9Bed%C5%82oga:Str_len/core" title="Pśedłoga:Str len/core – Lower Sorbian" lang="dsb" hreflang="dsb" data-title="Pśedłoga:Str len/core" data-language-autonym="Dolnoserbski" data-language-local-name="Lower Sorbian" class="interlanguage-link-target"><span>Dolnoserbski</span></a></li><li class="interlanguage-link interwiki-dty mw-list-item"><a href="https://dty.wikipedia.org/wiki/%E0%A4%A2%E0%A4%BE%E0%A4%81%E0%A4%9A%E0%A4%BE:Str_len/core" title="ढाँचा:Str len/core – Doteli" lang="dty" hreflang="dty" data-title="ढाँचा:Str len/core" data-language-autonym="डोटेली" data-language-local-name="Doteli" class="interlanguage-link-target"><span>डोटेली</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Template:Str_len/core" title="Template:Str len/core – English" lang="en" hreflang="en" data-title="Template:Str len/core" data-language-autonym="English" data-language-local-name="English" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Txantiloi:Str_len/core" title="Txantiloi:Str len/core – Basque" lang="eu" hreflang="eu" data-title="Txantiloi:Str len/core" data-language-autonym="Euskara" data-language-local-name="Basque" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A7%D9%84%DA%AF%D9%88:Str_len/core" title="الگو:Str len/core – Persian" lang="fa" hreflang="fa" data-title="الگو:Str len/core" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-gag mw-list-item"><a href="https://gag.wikipedia.org/wiki/%C5%9Eablon:Str_len/core" title="Şablon:Str len/core – Gagauz" lang="gag" hreflang="gag" data-title="Şablon:Str len/core" data-language-autonym="Gagauz" data-language-local-name="Gagauz" class="interlanguage-link-target"><span>Gagauz</span></a></li><li class="interlanguage-link interwiki-gd mw-list-item"><a href="https://gd.wikipedia.org/wiki/Teamplaid:Str_len/core" title="Teamplaid:Str len/core – Scottish Gaelic" lang="gd" hreflang="gd" data-title="Teamplaid:Str len/core" data-language-autonym="Gàidhlig" data-language-local-name="Scottish Gaelic" class="interlanguage-link-target"><span>Gàidhlig</span></a></li><li class="interlanguage-link interwiki-gu mw-list-item"><a href="https://gu.wikipedia.org/wiki/%E0%AA%A2%E0%AA%BE%E0%AA%82%E0%AA%9A%E0%AB%8B:Str_len/core" title="ઢાંચો:Str len/core – Gujarati" lang="gu" hreflang="gu" data-title="ઢાંચો:Str len/core" data-language-autonym="ગુજરાતી" data-language-local-name="Gujarati" class="interlanguage-link-target"><span>ગુજરાતી</span></a></li><li class="interlanguage-link interwiki-ha mw-list-item"><a href="https://ha.wikipedia.org/wiki/Samfuri:Str_len/core" title="Samfuri:Str len/core – Hausa" lang="ha" hreflang="ha" data-title="Samfuri:Str len/core" data-language-autonym="Hausa" data-language-local-name="Hausa" class="interlanguage-link-target"><span>Hausa</span></a></li><li class="interlanguage-link interwiki-hsb mw-list-item"><a href="https://hsb.wikipedia.org/wiki/P%C5%99ed%C5%82oha:Str_len/core" title="Předłoha:Str len/core – Upper Sorbian" lang="hsb" hreflang="hsb" data-title="Předłoha:Str len/core" data-language-autonym="Hornjoserbsce" data-language-local-name="Upper Sorbian" class="interlanguage-link-target"><span>Hornjoserbsce</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D4%BF%D5%A1%D5%B2%D5%A1%D5%BA%D5%A1%D6%80:Str_len/core" title="Կաղապար:Str len/core – Armenian" lang="hy" hreflang="hy" data-title="Կաղապար:Str len/core" data-language-autonym="Հայերեն" data-language-local-name="Armenian" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Templat:Str_len/core" title="Templat:Str len/core – Indonesian" lang="id" hreflang="id" data-title="Templat:Str len/core" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/Template:Str_len/core" title="Template:Str len/core – Japanese" lang="ja" hreflang="ja" data-title="Template:Str len/core" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-jv mw-list-item"><a href="https://jv.wikipedia.org/wiki/Cithakan:Str_len/core" title="Cithakan:Str len/core – Javanese" lang="jv" hreflang="jv" data-title="Cithakan:Str len/core" data-language-autonym="Jawa" data-language-local-name="Javanese" class="interlanguage-link-target"><span>Jawa</span></a></li><li class="interlanguage-link interwiki-kab mw-list-item"><a href="https://kab.wikipedia.org/wiki/Tal%C9%A3a:Str_len/core" title="Talɣa:Str len/core – Kabyle" lang="kab" hreflang="kab" data-title="Talɣa:Str len/core" data-language-autonym="Taqbaylit" data-language-local-name="Kabyle" class="interlanguage-link-target"><span>Taqbaylit</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/%D2%AE%D0%BB%D0%B3%D1%96:Str_len/core" title="Үлгі:Str len/core – Kazakh" lang="kk" hreflang="kk" data-title="Үлгі:Str len/core" data-language-autonym="Қазақша" data-language-local-name="Kazakh" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-km mw-list-item"><a href="https://km.wikipedia.org/wiki/%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%82%E1%9F%86%E1%9E%9A%E1%9E%BC:Str_len/core" title="ទំព័រគំរូ:Str len/core – Khmer" lang="km" hreflang="km" data-title="ទំព័រគំរូ:Str len/core" data-language-autonym="ភាសាខ្មែរ" data-language-local-name="Khmer" class="interlanguage-link-target"><span>ភាសាខ្មែរ</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%ED%8B%80:Str_len/core" title="틀:Str len/core – Korean" lang="ko" hreflang="ko" data-title="틀:Str len/core" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ku mw-list-item"><a href="https://ku.wikipedia.org/wiki/%C5%9Eablon:Str_len/core" title="Şablon:Str len/core – Kurdish" lang="ku" hreflang="ku" data-title="Şablon:Str len/core" data-language-autonym="Kurdî" data-language-local-name="Kurdish" class="interlanguage-link-target"><span>Kurdî</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/Formula:Str_len/core" title="Formula:Str len/core – Latin" lang="la" hreflang="la" data-title="Formula:Str len/core" data-language-autonym="Latina" data-language-local-name="Latin" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Veidne:Str_len/core" title="Veidne:Str len/core – Latvian" lang="lv" hreflang="lv" data-title="Veidne:Str len/core" data-language-autonym="Latviešu" data-language-local-name="Latvian" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-mai mw-list-item"><a href="https://mai.wikipedia.org/wiki/%E0%A4%86%E0%A4%95%E0%A5%83%E0%A4%A4%E0%A4%BF:Str_len/core" title="आकृति:Str len/core – Maithili" lang="mai" hreflang="mai" data-title="आकृति:Str len/core" data-language-autonym="मैथिली" data-language-local-name="Maithili" class="interlanguage-link-target"><span>मैथिली</span></a></li><li class="interlanguage-link interwiki-mhr mw-list-item"><a href="https://mhr.wikipedia.org/wiki/%D0%9A%D1%8B%D1%88%D0%BA%D0%B0%D1%80:Str_len/core" title="Кышкар:Str len/core – Eastern Mari" lang="mhr" hreflang="mhr" data-title="Кышкар:Str len/core" data-language-autonym="Олык марий" data-language-local-name="Eastern Mari" class="interlanguage-link-target"><span>Олык марий</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/%D0%9F%D1%80%D0%B5%D0%B4%D0%BB%D0%BE%D1%88%D0%BA%D0%B0:Str_len/core" title="Предлошка:Str len/core – Macedonian" lang="mk" hreflang="mk" data-title="Предлошка:Str len/core" data-language-autonym="Македонски" data-language-local-name="Macedonian" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%AB%E0%B4%B2%E0%B4%95%E0%B4%82:Str_len/core" title="ഫലകം:Str len/core – Malayalam" lang="ml" hreflang="ml" data-title="ഫലകം:Str len/core" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%B8%E0%A4%BE%E0%A4%9A%E0%A4%BE:Str_len/core" title="साचा:Str len/core – Marathi" lang="mr" hreflang="mr" data-title="साचा:Str len/core" data-language-autonym="मराठी" data-language-local-name="Marathi" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-mrj mw-list-item"><a href="https://mrj.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Str_len/core" title="Шаблон:Str len/core – Western Mari" lang="mrj" hreflang="mrj" data-title="Шаблон:Str len/core" data-language-autonym="Кырык мары" data-language-local-name="Western Mari" class="interlanguage-link-target"><span>Кырык мары</span></a></li><li class="interlanguage-link interwiki-ne mw-list-item"><a href="https://ne.wikipedia.org/wiki/%E0%A4%A2%E0%A4%BE%E0%A4%81%E0%A4%9A%E0%A4%BE:Str_len/core" title="ढाँचा:Str len/core – Nepali" lang="ne" hreflang="ne" data-title="ढाँचा:Str len/core" data-language-autonym="नेपाली" data-language-local-name="Nepali" class="interlanguage-link-target"><span>नेपाली</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Mal:Str_len/core" title="Mal:Str len/core – Norwegian Bokmål" lang="nb" hreflang="nb" data-title="Mal:Str len/core" data-language-autonym="Norsk bokmål" data-language-local-name="Norwegian Bokmål" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikipedia.org/wiki/%E0%AC%9B%E0%AC%BE%E0%AC%9E%E0%AD%8D%E0%AC%9A:Str_len/core" title="ଛାଞ୍ଚ:Str len/core – Odia" lang="or" hreflang="or" data-title="ଛାଞ୍ଚ:Str len/core" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="Odia" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-os mw-list-item"><a href="https://os.wikipedia.org/wiki/%D0%A5%D1%83%D1%8B%D0%B7%C3%A6%D0%B3:Str_len/core" title="Хуызæг:Str len/core – Ossetic" lang="os" hreflang="os" data-title="Хуызæг:Str len/core" data-language-autonym="Ирон" data-language-local-name="Ossetic" class="interlanguage-link-target"><span>Ирон</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%AB%E0%A8%B0%E0%A8%AE%E0%A8%BE:Str_len/core" title="ਫਰਮਾ:Str len/core – Punjabi" lang="pa" hreflang="pa" data-title="ਫਰਮਾ:Str len/core" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="Punjabi" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Predefini%C3%A7%C3%A3o:Str_len/core" title="Predefinição:Str len/core – Portuguese" lang="pt" hreflang="pt" data-title="Predefinição:Str len/core" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-sa mw-list-item"><a href="https://sa.wikipedia.org/wiki/%E0%A4%AB%E0%A4%B2%E0%A4%95%E0%A4%AE%E0%A5%8D:Str_len/core" title="फलकम्:Str len/core – Sanskrit" lang="sa" hreflang="sa" data-title="फलकम्:Str len/core" data-language-autonym="संस्कृतम्" data-language-local-name="Sanskrit" class="interlanguage-link-target"><span>संस्कृतम्</span></a></li><li class="interlanguage-link interwiki-si mw-list-item"><a href="https://si.wikipedia.org/wiki/%E0%B7%83%E0%B7%90%E0%B6%9A%E0%B7%92%E0%B6%BD%E0%B7%8A%E0%B6%BD:Str_len/core" title="සැකිල්ල:Str len/core – Sinhala" lang="si" hreflang="si" data-title="සැකිල්ල:Str len/core" data-language-autonym="සිංහල" data-language-local-name="Sinhala" class="interlanguage-link-target"><span>සිංහල</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Predloga:Str_len/core" title="Predloga:Str len/core – Slovenian" lang="sl" hreflang="sl" data-title="Predloga:Str len/core" data-language-autonym="Slovenščina" data-language-local-name="Slovenian" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Mall:Str_len/core" title="Mall:Str len/core – Swedish" lang="sv" hreflang="sv" data-title="Mall:Str len/core" data-language-autonym="Svenska" data-language-local-name="Swedish" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%B5%E0%AE%BE%E0%AE%B0%E0%AF%8D%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%B0%E0%AF%81:Str_len/core" title="வார்ப்புரு:Str len/core – Tamil" lang="ta" hreflang="ta" data-title="வார்ப்புரு:Str len/core" data-language-autonym="தமிழ்" data-language-local-name="Tamil" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-tt mw-list-item"><a href="https://tt.wikipedia.org/wiki/%D0%9A%D0%B0%D0%BB%D1%8B%D0%BF:Str_len/core" title="Калып:Str len/core – Tatar" lang="tt" hreflang="tt" data-title="Калып:Str len/core" data-language-autonym="Татарча / tatarça" data-language-local-name="Tatar" class="interlanguage-link-target"><span>Татарча / tatarça</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%A8%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD:Str_len/core" title="Шаблон:Str len/core – Ukrainian" lang="uk" hreflang="uk" data-title="Шаблон:Str len/core" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%B3%D8%A7%D9%86%DA%86%DB%81:Str_len/core" title="سانچہ:Str len/core – Urdu" lang="ur" hreflang="ur" data-title="سانچہ:Str len/core" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/Template:Str_len/core" title="Template:Str len/core – Wu" lang="wuu" hreflang="wuu" data-title="Template:Str len/core" data-language-autonym="吴语" data-language-local-name="Wu" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-yi mw-list-item"><a href="https://yi.wikipedia.org/wiki/%D7%9E%D7%95%D7%A1%D7%98%D7%A2%D7%A8:Str_len/core" title="מוסטער:Str len/core – Yiddish" lang="yi" hreflang="yi" data-title="מוסטער:Str len/core" data-language-autonym="ייִדיש" data-language-local-name="Yiddish" class="interlanguage-link-target"><span>ייִדיש</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/Template:Str_len/core" title="Template:Str len/core – Cantonese" lang="yue" hreflang="yue" data-title="Template:Str len/core" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q11141746#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-template" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Template:Str_len/core" title="टेम्प्लेट स्वयादिसँ [c]" accesskey="c"><span>टेम्प्लेट</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Template_talk:Str_len/core&action=edit&redlink=1" rel="discussion" class="new" title="Discussion about the content page (पौ मदु) [t]" accesskey="t"><span>खँल्हाबल्हा</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">नेपाल भाषा</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Template:Str_len/core"><span>ब्वनादिसँ</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&action=edit" title="Edit the source code of this page [e]" accesskey="e"><span>Edit source</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&action=history" title="थ्व पौयागु पुलाँगु संस्करण। [h]" accesskey="h"><span>इतिहास स्वयादिसँ</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="ज्याभः सन्दुक" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">ज्याभः सन्दुक</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Template:Str_len/core"><span>ब्वनादिसँ</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&action=edit" title="Edit the source code of this page [e]" accesskey="e"><span>Edit source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&action=history"><span>इतिहास स्वयादिसँ</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:WhatLinksHere/Template:Str_len/core" title="थन स्वाइगु सकल विकिपौया धलः [j]" accesskey="j"><span>थन छु स्वाइ</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:RecentChangesLinked/Template:Str_len/core" rel="nofollow" title="थ्व पौ नाप स्वाःगु पौतेगु न्हुगु हिलेज्या [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=new" title="किपा वा माध्यम फाइल अपलोड यानादिसँ [u]" accesskey="u"><span>फाइल अपलोड</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:SpecialPages" title="विशेष पौतेगु धलः [q]" accesskey="q"><span>विशेष पौ</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&oldid=646475" title="थ्व पौस थ्व संस्करणया पर्मानेन्ट लिङ्क"><span>स्थायी स्वापु(लिंक)</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Template:Str_len/core&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:UrlShortener&url=https%3A%2F%2Fnew.wikipedia.org%2Fwiki%2FTemplate%3AStr_len%2Fcore"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:QrCode&url=https%3A%2F%2Fnew.wikipedia.org%2Fwiki%2FTemplate%3AStr_len%2Fcore"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:DownloadAsPdf&page=Template%3AStr_len%2Fcore&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="थ्व पौया ध्वायेज्युगु संस्करण [p]" accesskey="p"><span>ध्वायेज्यूगु संस्करण</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Template:Str_len/core" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-meta mw-list-item"><a href="https://meta.wikimedia.org/wiki/Template:Len/digit" hreflang="en"><span>Meta-Wiki</span></a></li><li class="wb-otherproject-link wb-otherproject-species mw-list-item"><a href="https://species.wikimedia.org/wiki/Template:Str_len/core" hreflang="en"><span>Wikispecies</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q11141746" title="Link to connected data repository item [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">विकिपिडिया नं</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">< <bdi dir="ltr"><a href="/wiki/Template:Str_len" title="Template:Str len">Template:Str len</a></bdi></div></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="new" dir="ltr"><p><br /> </p> <div id="template-documentation" class="template-documentation iezoomfix"> <div style="padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex;"> <span style="font-weight:bold;font-size:125%;"><span typeof="mw:File"><span><img alt="Documentation icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png" decoding="async" width="50" height="22" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/75px-Test_Template_Info-Icon_-_Version_%282%29.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/100px-Test_Template_Info-Icon_-_Version_%282%29.svg.png 2x" data-file-width="1792" data-file-height="800" /></span></span> Template documentation</span><span class="mw-editsection-like plainlinks" id="doc_editlinks">[<a href="/wiki/Template:Str_len/core/doc" title="Template:Str len/core/doc">view</a>] [<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/doc&action=edit">edit</a>] [<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/doc&action=history">history</a>] [<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core&action=purge">purge</a>]</span></div> <table class="plainlinks ombox ombox-content" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/3/38/Imbox_content.png" decoding="async" width="40" height="40" class="mw-file-element" data-file-width="40" data-file-height="40" /></span></span></td><td class="mbox-text"><b>This template is used in system messages.</b> <br /> Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's <a href="/w/index.php?title=Template:Str_len/core/sandbox&action=edit&redlink=1" class="new" title="Template:Str len/core/sandbox (पौ मदु)">/sandbox</a> or <a href="/w/index.php?title=Template:Str_len/core/testcases&action=edit&redlink=1" class="new" title="Template:Str len/core/testcases (पौ मदु)">/testcases</a> subpage, or in your own <a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A4%BF%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:Subpages&action=edit&redlink=1" class="new" title="विकिपिडिया:Subpages (पौ मदु)">user space</a>. The tested changes can then be added in one single edit to this template. Please discuss any changes at the <a href="/w/index.php?title=Template_talk:Str_len/core&action=edit&redlink=1" class="new" title="Template talk:Str len/core (पौ मदु)">talk page</a> before implementing them.</td></tr></tbody></table> <p>This is the {{<a class="mw-selflink selflink">str len/core</a>}} sub-template. </p><p>Do not use this template directly, use {{<a href="/wiki/Template:Str_len" title="Template:Str len">str len</a>}} instead. </p><p>This template is called from {{<a href="/wiki/Template:Str_len" title="Template:Str len">str len</a>}}, see user documentation there. </p><p>The rest of the sections here are only for those that want to understand the internal workings of this template. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading3"><h3 id="Technical_details">Technical details</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Template:Str_len/core/doc&action=edit&section=T-1" title="खण्ड सम्पादन: Technical details"><span>सम्पादन</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki has no parser function or magic word to measure string lengths. And measuring string length using template code is very heavy on the servers. Thus this template is as optimised as possible. </p><p>Based on code for determining whether the length of a string is greater than a given value, the template searches for the actual string length. This sub-template holds most of the search function for <span class="nowrap">{{str len}}</span>. This sub-template can search from 000 to 499. The reason for the length limitation is that the magic word <span style="white-space:nowrap;"><code>{{padleft:|}}</code></span> only can pad up to 500 characters. </p><p>The basic comparison function used here is this: </p> <pre>{{#ifeq: xABCD | x{{padleft:ABCD| 9 }} | Equal or longer. | Shorter. }} </pre> <p>Which means: "<i>Is the string ABCD >= 9 characters long?</i>" </p><p>Switch-cases and ifeq are too smart, they understand numbers. So they think that "0" and "00" are equal. That is why this code adds an "x" in front of the parameters, to make them into strings like "x0123" so the string comparisons work properly. </p> <div class="mw-heading mw-heading4"><h4 id="About_((str_len))"><span id="About_.28.28str_len.29.29"></span>About ((str len))</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Template:Str_len/core/doc&action=edit&section=T-2" title="खण्ड सम्पादन: About ((str len))"><span>सम्पादन</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some of these operations are whitespace sensitive, so we must strip away any whitespace around the string parameter. That's why the string parameter is surrounded by <code>{{#if:x| {{{1|}}} }}</code> in some places. </p><p><span class="nowrap">{{str len}}</span> first checks if the string is 500 characters or longer, since the search function in /core would otherwise return 499 for any string of 500 characters or more. (The older version of /core returned 999.) This also means that checking the really long strings is fairly efficient, it only takes one padleft operation and no parsing of the /core sub-template. </p><p>The three calls to /core is actually a loop, or recursion if you will. </p><p>The parameters to /core are whitespace sensitive. That is why we indent the parameters to /core so strangely. See more about this in the next section. If you change any of the indentation in <span class="nowrap">{{str len}}</span> you are likely to break this template. We could of course add a lot of whitespace stripping in /core, but that would cause more code in /core and would be inefficient. </p> <div class="mw-heading mw-heading4"><h4 id="About_((str_len/core))"><span id="About_.28.28str_len.2Fcore.29.29"></span>About ((str len/core))</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Template:Str_len/core/doc&action=edit&section=T-3" title="खण्ड सम्पादन: About ((str len/core))"><span>सम्पादन</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The code in this template is heavily optimised in several ways: </p> <ul><li>If we only go after what the <a href="/w/index.php?title=Template_talk:Str_len&action=edit&redlink=1" class="new" title="Template talk:Str len (पौ मदु)">NewPP limit reports</a> tell, then it might seem we could optimise further by splitting this /core template up into three different /core templates, one for each search round. Since then we don't need the switch-case, and that gives lower values in the NewPP limit reports. However we know it is very costly for the Wikipedia servers to fetch more sub-templates, so we are pretty sure that would be much more costly.</li> <li>MediaWiki developers have told us that calling padleft is costly, thus this template uses optimised search trees so it makes as few calls to padleft as possible. See next section for more on the search trees.</li></ul> <p>Note: The x's used in the explanation from here on just mean "any value from 0 to 9". </p><p>This template first searches 0xx to 4xx and then returns 0 to 4, as in 000 to 400. Then it searches x0x to x9x and returns x0 to x9, as in x00 to x90. Then it searches xx0 to xx9 and returns xx0 to xx9. </p><p>This template takes three unnamed (numbered) parameters: </p><p>1: The string that we want to know the length of. </p><p>2: The number returned by the previous rounds of searching. Thus at first search this parameter should be empty, at second search this parameter should hold a value between 0 and 4, and at third search it should hold a value between 00 and 49. </p><p>3: A word that tells which search should be done. For the first search this parameter should be "hundreds" so it searches from 0xx to 4xx. At second search it should be "tens", so it searches x00 to x90. And at third search it should be "ones", so it searches xx0 to xx9. </p><p>The parameters to this template are whitespace sensitive: Parameter 1 must not have any whitespace before it, and parameter 2 must not have any whitespace after it. </p> <div class="mw-heading mw-heading4"><h4 id="Search_trees_used">Search trees used</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Template:Str_len/core/doc&action=edit&section=T-4" title="खण्ड सम्पादन: Search trees used"><span>सम्पादन</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The search trees used in the loops are optimised based on the assumption that shorter strings are much more common. Note that finding 0 requires to do the "string >= 1" comparison, thus takes at least one operation. And finding for instance 1 means also checking the "string >= 2" comparison, thus takes at least two operations. </p><p>The numbers shown in the trees below are not the value searched for, but the value compared with. Thus <code>--4--</code> means the comparison "string >= 4". </p><p>0xx-4xx, using linear search since most strings will probably be less than 100 bytes: </p> <pre>1--2--3--4 0 1 2 3 4 = Values to find. 1+2+3+4+4 = 14 comparisons to find all values once. </pre> <p>x0x-x9x, using linear search for 0x-3x, binary search for 4x-9x, since most strings will probably be less than 40 bytes: </p> <pre>1--2--3--4--6--8--9 | | 5 7 0 1 2 3 4 5 6 7 8 9 = Values to find. 1+2+3+4+6+6+7+7+7+7 = 50 comparisons to find all values once. </pre> <p>xx0-xx9, using binary search: </p> <pre>4-----6--8--9 | | | 2--3 5 7 | 1 0 1 2 3 4 5 6 7 8 9 = Values to find. 3+3+3+3+3+3+4+4+4+4 = 34 comparisons to find all values once. </pre> <p>For comparison, here is the data for a full linear search: </p> <pre>1--2--3--4--5--6--7--8--9 0 1 2 3 4 5 6 7 8 9 = Values to find. 1+2+3+4+5+6+7+8+9+9 = 54 comparisons to find all values once. </pre> <div class="mw-heading mw-heading3"><h3 id="See_also">See also</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Template:Str_len/core/doc&action=edit&section=T-5" title="खण्ड सम्पादन: See also"><span>सम्पादन</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="https://www.mediawiki.org/wiki/Help:Magic_words" class="extiw" title="mw:Help:Magic words">mw:Help:Magic words</a> – About <code>{{padleft:|}}</code>.</li> <li><a href="https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions" class="extiw" title="mw:Help:Extension:ParserFunctions">mw:Help:Extension:ParserFunctions</a> – About <code>{{#ifeq:|||}}</code> etc.</li></ul> <div style="clear:both;"> </div></div><table id="documentation-meta-data" class="plainlinks fmbox fmbox-system" role="presentation" style="background-color: #ecfcf4;"><tbody><tr><td class="mbox-text" style="font-style: italic;">The above <a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A4%BF%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:Template_documentation&action=edit&redlink=1" class="new" title="विकिपिडिया:Template documentation (पौ मदु)">documentation</a> is <a href="/w/index.php?title=%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A4%BF%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:Transclusion&action=edit&redlink=1" class="new" title="विकिपिडिया:Transclusion (पौ मदु)">transcluded</a> from <a href="/wiki/Template:Str_len/core/doc" title="Template:Str len/core/doc">Template:Str len/core/doc</a>. <small style="font-style: normal;">(<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/doc&action=edit">edit</a> | <a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/doc&action=history">history</a>)</small><br />Editors can experiment in this template's sandbox <small style="font-style: normal;">(<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/sandbox&action=edit&preload=Template%3ADocumentation%2Fpreload-sandbox">create</a> | <a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/sandbox&preload=Template%3AStr+len%2Fcore&action=edit&summary=Create+sandbox+version+of+%5B%5BTemplate%3AStr+len%2Fcore%5D%5D">mirror</a>)</small> and testcases <small style="font-style: normal;">(<a class="external text" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core/testcases&action=edit&preload=Template%3ADocumentation%2Fpreload-testcases">create</a>)</small> pages.<br />Please add categories to the <a href="/wiki/Template:Str_len/core/doc" title="Template:Str len/core/doc">/doc</a> subpage. <a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:PrefixIndex/Template:Str_len/core/" title="विशेष:PrefixIndex/Template:Str len/core/">Subpages of this template</a>.</td></tr></tbody></table> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐794d77dd7f‐bqk2p Cached time: 20241030053752 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.089 seconds Real time usage: 0.158 seconds Preprocessor visited node count: 313/1000000 Post‐expand include size: 27135/2097152 bytes Template argument size: 110/2097152 bytes Highest expansion depth: 10/100 Expensive parser function count: 4/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 693/5000000 bytes Lua time usage: 0.025/10.000 seconds Lua memory usage: 1150188/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 131.308 1 -total 100.00% 131.308 1 Template:Documentation 35.13% 46.134 1 Template:Str_len/core/doc 11.64% 15.286 1 Template:Used_in_system 4.90% 6.440 3 Template:Tlf 4.19% 5.499 1 Template:Ombox 3.66% 4.804 1 Template:Tlc 2.86% 3.753 3 Template:Tl 2.74% 3.600 1 Template:Documentation_subpage --> <!-- Saved in parser cache with key newwiki:pcache:idhash:189011-0!canonical and timestamp 20241030053752 and revision id 646475. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://new.wikipedia.org/w/index.php?title=Template:Str_len/core&oldid=646475">https://new.wikipedia.org/w/index.php?title=Template:Str_len/core&oldid=646475</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%B6%E0%A5%87%E0%A4%B7:Categories" title="विशेष:Categories">पुच</a>: <ul><li><a href="/w/index.php?title=%E0%A4%AA%E0%A5%81%E0%A4%9A%E0%A4%83:String_manipulation_templates&action=edit&redlink=1" class="new" title="पुचः:String manipulation templates (पौ मदु)">String manipulation templates</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on ३ अक्टोबर २०११, at १८:१४.</li> <li id="footer-info-copyright">Text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. See <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> for details.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">दुबिस्ता नियम</a></li> <li id="footer-places-about"><a href="/wiki/%E0%A4%9C%E0%A5%8D%E0%A4%AF%E0%A4%BE%E0%A4%96%E0%A4%81:%E0%A4%AC%E0%A4%BE%E0%A4%B0%E0%A5%87%E0%A4%AF%E0%A5%8D">विकिपिडियायागु बारेय्</a></li> <li id="footer-places-disclaimers"><a href="/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A4%BF%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:%E0%A4%B8%E0%A4%BE%E0%A4%A7%E0%A4%BE%E0%A4%B0%E0%A4%A3_%E0%A4%A1%E0%A4%BF%E0%A4%B8%E0%A5%8D%E0%A4%95%E0%A5%8D%E0%A4%B2%E0%A5%87%E0%A4%AE%E0%A4%B0%E0%A5%8D%E0%A4%B8">डिस्क्लेमर्स</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/new.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//new.m.wikipedia.org/w/index.php?title=Template:Str_len/core&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-wdqp9","wgBackendResponseTime":130,"wgPageParseReport":{"limitreport":{"cputime":"0.089","walltime":"0.158","ppvisitednodes":{"value":313,"limit":1000000},"postexpandincludesize":{"value":27135,"limit":2097152},"templateargumentsize":{"value":110,"limit":2097152},"expansiondepth":{"value":10,"limit":100},"expensivefunctioncount":{"value":4,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":693,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 131.308 1 -total","100.00% 131.308 1 Template:Documentation"," 35.13% 46.134 1 Template:Str_len/core/doc"," 11.64% 15.286 1 Template:Used_in_system"," 4.90% 6.440 3 Template:Tlf"," 4.19% 5.499 1 Template:Ombox"," 3.66% 4.804 1 Template:Tlc"," 2.86% 3.753 3 Template:Tl"," 2.74% 3.600 1 Template:Documentation_subpage"]},"scribunto":{"limitreport-timeusage":{"value":"0.025","limit":"10.000"},"limitreport-memusage":{"value":1150188,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-794d77dd7f-bqk2p","timestamp":"20241030053752","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>