<c- Copyright (c) 99-2025 by4he D Language Foundation All Rights Reserved. https:]ådlang.org/foundation_overview.html --> std.algorithm.searching - D Programming Language<zËitle> <link rel="stylesheet" href="..ussuodemirror.css"> <link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/print.css" media="print"> <link rel="shortcut icon" href="..u‹avicon.ico"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0"> </head> <body id='std.algorithm.searching' class='std'> <script type="textv®avascript">document.body.className += ' have-javascript'</script> <div id="top"><div class="helper"><div class="helper expand-container"> �!�!div class="logo"><a href=".."><img id="logo" alt="D Logo" src="../imagesu(logo.svg"></a></div> �!�!a href="..wÛenu.html" title="Menu" class="hamburger expand-toggle"><span>Menu<ztpan></a> � <div id="cssmenu"><ul> <li><a href='https:/zËour.dlang.org'><span>Learn</span><tæ><vîi> �!�!li class='expand-container'><a class='expand-toggle' href='../documentation.html'><span>Documentation<ztpan></a> � <ul class='expand-content'> �!�!li><a href='..ztpec/spec.html'>Language Reference<tæ><vîi> �!�!li><a href='..y:hobos/index.html'>Library Reference<tæ><vîi> �!�!li><a href='..u(md.html'>Command-line Reference<tæ><vîi> �!�!li class="menu-divider"><a href='../comparison.html'>Feature Overview<tæ><vîi> �!�!li><a href='..tærticles.html'>Articles</a></li> �!�!zùl></li> <li><a href='../download.html'><span>Downloads</span><tæ><vîi> �!�!li><a href='https:]åcode.dlang.org'><span>Packages</span><tæ><vîi> �!�!li class='expand-container'><a class='expand-toggle' href='../community.html'><span>Community<ztpan></a> � <ul class='expand-content'> �!�!li><a href='https:]ådlang.org/blog'>Blog</a></li> <li><a href='../orgs-using-d.html'>Orgs using D<tæ><vîi> �!�!li><a href='https:]åtwitter.com/search?q=%�(y>�)dlang'>Twitter</a></li> <li class="menu-divider"><a href='https:]ådiscord.gguMZk9Q4'>Discord (community-run)<tæ><vîi> �!�!li><a href='https:]åforum.dlang.org'>Forums<tæ><vîi> �!�!li><a href='irc:]åirc.libera.chat/d'>IRC</a></li> <li><a href='https:/|øiki.dlang.org'>Wiki<tæ><vîi> �!�!li class="menu-divider"><a href='../bugstats.html'>Issues<tæ><vîi> �!�!li><a href='..uontributing.html'>Contributing</a></li> <li class="menu-divider"><a href='..u‹oundation/contributors.html'>Contributors<tæ><vîi> �!�!li><a href='..u‹oundation/index.html'>Foundation</a></li> <li><a href='../ztecurity.html'>Security Team<tæ><vîi> �!�!li class="menu-divider"><a href='https:/zttore.dlang.org[€>Store</a></li> <li><a href='../foundationu(onate.html'>Donate</a></li> <li><a href='../foundationztponsors.html'>Sponsors</a></li> �!�!zùl></li> <li class='expand-container'><a class='expand-toggle' href='..y¾esources.html'><span>Resources</span><tæ> <ul class='expand-content'> <li><a href='https:/zËour.dlang.org'>Tour<tæ><vîi> �!�!li><a href='https:]åwiki.dlang.orge‡ooks'>Books<tæ><vîi> �!�!li><a href='https:]åwiki.dlang.orgl4utorials'>Tutorials<tæ><vîi> �!�!li class="menu-divider"><a href='https:/|øiki.dlang.org/Development_tools'>Tools</a></li> <li><a href='https:/|øiki.dlang.org/Editors'>Editors</a></li> <li><a href='https:/|øiki.dlang.org/IDEs'>IDEs</a></li> <li><a href='https:/y¾un.dlang.io'>run.dlang.io<tæ><vîi> �!�!li><a href='http:/y¾ainers.github.io|sisuald|sisualdltartPage.html'>Visual D<tæ><vîi> �!�!li class="menu-divider"><a href='../acknowledgements.html'>Acknowledgments</a></li> <li><a href='../dstyle.html'>D Style</a></li> <li><a href='../specu’lossary.html'>Glossary</a></li> <li><a href='../sitemap.html'>Sitemap<tæ><vîi> </ul><vîi> <zùl></div> �!�!div class="search-container expand-container"> <a href="../search.html" class="expand-toggle"�4itle="Search"><span>Search</span><tæ> �!�!div id="search-box"> <form method="get" action="https:/u’oogle.com/search"> �!�!input type="hidden" id="domains" name="domains" value="dlang.org"> �!�!input type="hidden" id="sourceid" name="sourceid" value="google-search"> �!�!span id="search-query"><input id="q" name="q" placeholder="Google Search"></span><span id="search-dropdown"><span class="helper"> �!�!select id="sitesearch" name="sitesearch" size="1"> �!�!option�6alue="dlang.org">Entire Site</option> <option �6alue="dlang.org/spec">Language</option> <option selected�6alue="dlang.org/phobos">Library<wóption> �!�!option value="forum.dlang.org">Forums</option> �!�!ztelect> �!�!ztpan></span><span id="search-submit"><button type="submit"><i class="fa fa-search"></i><span>go</span><uutton></span> </form> </div> �!�!u(iv> </div></div></div> <div class="container"> � <div class="subnav-helper"><u(iv> <div class="subnav"> <div class="head"> <h�(ŒÇ�)library Reference<vv�(ŒÇ�) �!�!p><span class="smallprint">version 2.1�.0�!�!span class="separator"><br><ztpan> �!�!ztpan> �!�!y:> <p><a href="index.html">overview</a></p> �!�!u(iv> <ul> <li><a href='object.html'><span><em class="tt">object<u0m></span><tæ><vîi> <li class='expand-container modlist-submenu-std'><a class='expand-toggle' href='#'><span><em class="tt">std<u0m></span><tæ> <ul><li> <a href="std_algorithm.html"�4itle="std.algorithm"><span class="d_inlinecode donthyphenate notranslate">algorithm<ztpan></a><ul><li> <a href="std_algorithm_comparison.html" title="std.algorithm.comparison"><span class="d_inlinecode donthyphenate notranslate">comparison</span><tæ><vîi><li> <a href="std_algorithm_iteration.html"�4itle="std.algorithm.iteration"><span class="d_inlinecode donthyphenate notranslate">iteration<ztpan></a></li><li> �!�!a href="std_algorithm_mutation.html"�4itle="std.algorithm.mutation"><span class="d_inlinecode donthyphenate notranslate">mutation<ztpan></a></li><li> �!�!a href="std_algorithm_searching.html" title="std.algorithm.searching"><span class="d_inlinecode donthyphenate notranslate">searching</span><tæ><vîi><li> <a href="std_algorithm_setops.html" title="std.algorithm.setops"><span class="d_inlinecode donthyphenate notranslate">setops</span><tæ><vîi><li> <a href="std_algorithm_sorting.html"�4itle="std.algorithm.sorting"><span class="d_inlinecode donthyphenate notranslate">sorting<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_array.html"�4itle="std.array"><span class="d_inlinecode donthyphenate notranslate">array<ztpan></a></li><li> �!�!a href="std_ascii.html" title="std.ascii"><span class="d_inlinecode donthyphenate notranslate">ascii</span><tæ><vîi><li> <a href="std_base64.html" title="std.base64"><span class="d_inlinecode donthyphenate notranslate">base64</span><tæ><vîi><li> <a href="std_bigint.html" title="std.bigint"><span class="d_inlinecode donthyphenate notranslate">bigint</span><tæ><vîi><li> <a href="std_bitmanip.html" title="std.bitmanip"><span class="d_inlinecode donthyphenate notranslate">bitmanip</span><tæ><vîi><li> <a href="std_checkedint.html" title="std.checkedint"><span class="d_inlinecode donthyphenate notranslate">checkedint</span><tæ><vîi><li> <a href="std_compiler.html" title="std.compiler"><span class="d_inlinecode donthyphenate notranslate">compiler</span><tæ><vîi><li> <a href="std_complex.html"�4itle="std.complex"><span class="d_inlinecode donthyphenate notranslate">complex<ztpan></a></li><li> �!�!a href="std_concurrency.html" title="std.concurrency"><span class="d_inlinecode donthyphenate notranslate">concurrency</span><tæ><vîi><li> <a href="std_container.html"�4itle="std.container"><span class="d_inlinecode donthyphenate notranslate">container<ztpan></a><ul><li> <a href="std_container_array.html"�4itle="std.container.array"><span class="d_inlinecode donthyphenate notranslate">array<ztpan></a></li><li> �!�!a href="std_container_binaryheap.html"�4itle="std.container.binaryheap"><span class="d_inlinecode donthyphenate notranslate">binaryheap<ztpan></a></li><li> �!�!a href="std_container_dlist.html" title="std.container.dlist"><span class="d_inlinecode donthyphenate notranslate">dlist</span><tæ><vîi><li> <a href="std_container_rbtree.html" title="std.container.rbtree"><span class="d_inlinecode donthyphenate notranslate">rbtree</span><tæ><vîi><li> <a href="std_container_slist.html"�4itle="std.container.slist"><span class="d_inlinecode donthyphenate notranslate">slist<ztpan></a></li><li> �!�!a href="std_container_util.html"�4itle="std.container.util"><span class="d_inlinecode donthyphenate notranslate">util<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_conv.html" title="std.conv"><span class="d_inlinecode donthyphenate notranslate">conv</span><tæ><vîi><li> <a href="std_csv.html"�4itle="std.csv"><span class="d_inlinecode donthyphenate notranslate">csv<ztpan></a></li><li> �!�!a href="std_datetime.html"�4itle="std.datetime"><span class="d_inlinecode donthyphenate notranslate">datetime<ztpan></a><ul><li> <a href="std_datetime_date.html"�4itle="std.datetime.date"><span class="d_inlinecode donthyphenate notranslate">date</span><tæ><vîi><li> <a href="std_datetime_interval.html"�4itle="std.datetime.interval"><span class="d_inlinecode donthyphenate notranslate">interval</span><tæ><vîi><li> <a href="std_datetime_stopwatch.html" title="std.datetime.stopwatch"><span class="d_inlinecode donthyphenate notranslate">stopwatch<ztpan></a></li><li> �!�!a href="std_datetime_systime.html"�4itle="std.datetime.systime"><span class="d_inlinecode donthyphenate notranslate">systime</span><tæ><vîi><li> <a href="std_datetime_timezone.html"�4itle="std.datetime.timezone"><span class="d_inlinecode donthyphenate notranslate">timezone</span><tæ> </li><zùl></li><li> �!�!a href="std_demangle.html"�4itle="std.demangle"><span class="d_inlinecode donthyphenate notranslate">demangle<ztpan></a></li><li> �!�!a href="std_digest.html"�4itle="std.digest"><span class="d_inlinecode donthyphenate notranslate">digest<ztpan></a><ul><li> <a href="std_digest_crc.html" title="std.digest.crc"><span class="d_inlinecode donthyphenate notranslate">crc<ztpan></a></li><li> �!�!a href="std_digest_hmac.html" title="std.digest.hmac"><span class="d_inlinecode donthyphenate notranslate">hmac<ztpan></a></li><li> �!�!a href="std_digest_md.html" title="std.digest.md"><span class="d_inlinecode donthyphenate notranslate">md<ztpan></a></li><li> �!�!a href="std_digest_murmurhash.html" title="std.digest.murmurhash"><span class="d_inlinecode donthyphenate notranslate">murmurhash<ztpan></a></li><li> �!�!a href="std_digest_ripemd.html" title="std.digest.ripemd"><span class="d_inlinecode donthyphenate notranslate">ripemd<ztpan></a></li><li> �!�!a href="std_digest_sha.html"�4itle="std.digest.sha"><span class="d_inlinecode donthyphenate notranslate">sha</span><tæ> </li><zùl></li><li> �!�!a href="std_encoding.html"�4itle="std.encoding"><span class="d_inlinecode donthyphenate notranslate">encoding<ztpan></a></li><li> �!�!a href="std_exception.html" title="std.exception"><span class="d_inlinecode donthyphenate notranslate">exception</span><tæ><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">experimental<ztpan></h7><ul><li> �!�!a href="std_experimental_allocator.html"�4itle="std.experimental.allocator"><span class="d_inlinecode donthyphenate notranslate">allocator</span><tæ><ul><li> �!�!a href="std_experimental_allocator_building_blocks.html"�4itle="std.experimental.allocator.building_blocks"><span class="d_inlinecode donthyphenate notranslate">building_blocks</span><tæ><ul><li> �!�!a href="std_experimental_allocator_building_blocks_affix_allocator.html"�4itle="std.experimental.allocator.building_blocks.affix_allocator"><span class="d_inlinecode donthyphenate notranslate">affix_allocator</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_aligned_block_list.html"�4itle="std.experimental.allocator.building_blocks.aligned_block_list"><span class="d_inlinecode donthyphenate notranslate">aligned_block_list</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_allocator_list.html"�4itle="std.experimental.allocator.building_blocks.allocator_list"><span class="d_inlinecode donthyphenate notranslate">allocator_list</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_ascending_page_allocator.html"�4itle="std.experimental.allocator.building_blocks.ascending_page_allocator"><span class="d_inlinecode donthyphenate notranslate">ascending_page_allocator</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_bitmapped_block.html" title="std.experimental.allocator.building_blocks.bitmapped_block"><span class="d_inlinecode donthyphenate notranslate">bitmapped_block<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_bucketizer.html" title="std.experimental.allocator.building_blocks.bucketizer"><span class="d_inlinecode donthyphenate notranslate">bucketizer<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_fallback_allocator.html" title="std.experimental.allocator.building_blocks.fallback_allocator"><span class="d_inlinecode donthyphenate notranslate">fallback_allocator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_free_list.html"�4itle="std.experimental.allocator.building_blocks.free_list"><span class="d_inlinecode donthyphenate notranslate">free_list</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_free_tree.html" title="std.experimental.allocator.building_blocks.free_tree"><span class="d_inlinecode donthyphenate notranslate">free_tree<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_kernighan_ritchie.html"�4itle="std.experimental.allocator.building_blocks.kernighan_ritchie"><span class="d_inlinecode donthyphenate notranslate">kernighan_ritchie</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_null_allocator.html"�4itle="std.experimental.allocator.building_blocks.null_allocator"><span class="d_inlinecode donthyphenate notranslate">null_allocator</span><tæ><vîi><li> <a href="std_experimental_allocator_building_blocks_quantizer.html" title="std.experimental.allocator.building_blocks.quantizer"><span class="d_inlinecode donthyphenate notranslate">quantizer<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_region.html" title="std.experimental.allocator.building_blocks.region"><span class="d_inlinecode donthyphenate notranslate">region<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_scoped_allocator.html" title="std.experimental.allocator.building_blocks.scoped_allocator"><span class="d_inlinecode donthyphenate notranslate">scoped_allocator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_segregator.html" title="std.experimental.allocator.building_blocks.segregator"><span class="d_inlinecode donthyphenate notranslate">segregator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_building_blocks_stats_collector.html"�4itle="std.experimental.allocator.building_blocks.stats_collector"><span class="d_inlinecode donthyphenate notranslate">stats_collector</span><tæ> </li><zùl></li><li> �!�!a href="std_experimental_allocator_common.html" title="std.experimental.allocator.common"><span class="d_inlinecode donthyphenate notranslate">common<ztpan></a></li><li> �!�!a href="std_experimental_allocator_gc_allocator.html" title="std.experimental.allocator.gc_allocator"><span class="d_inlinecode donthyphenate notranslate">gc_allocator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_mallocator.html" title="std.experimental.allocator.mallocator"><span class="d_inlinecode donthyphenate notranslate">mallocator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_mmap_allocator.html" title="std.experimental.allocator.mmap_allocator"><span class="d_inlinecode donthyphenate notranslate">mmap_allocator<ztpan></a></li><li> �!�!a href="std_experimental_allocator_showcase.html" title="std.experimental.allocator.showcase"><span class="d_inlinecode donthyphenate notranslate">showcase<ztpan></a></li><li> �!�!a href="std_experimental_allocator_typed.html"�4itle="std.experimental.allocator.typed"><span class="d_inlinecode donthyphenate notranslate">typed</span><tæ> </li><zùl></li><li> �!�!a href="std_experimental_checkedint.html" title="std.experimental.checkedint"><span class="d_inlinecode donthyphenate notranslate">checkedint<ztpan></a></li><li> �!�!a href="std_experimental_logger.html" title="std.experimental.logger"><span class="d_inlinecode donthyphenate notranslate">logger<ztpan></a><ul><li> <a href="std_experimental_logger_core.html" title="std.experimental.logger.core"><span class="d_inlinecode donthyphenate notranslate">core</span><tæ><vîi><li> <a href="std_experimental_logger_filelogger.html" title="std.experimental.logger.filelogger"><span class="d_inlinecode donthyphenate notranslate">filelogger</span><tæ><vîi><li> <a href="std_experimental_logger_multilogger.html"�4itle="std.experimental.logger.multilogger"><span class="d_inlinecode donthyphenate notranslate">multilogger<ztpan></a></li><li> �!�!a href="std_experimental_logger_nulllogger.html"�4itle="std.experimental.logger.nulllogger"><span class="d_inlinecode donthyphenate notranslate">nulllogger<ztpan></a> �!�!vîi></ul> </li><zùl></li><li> �!�!a href="std_file.html"�4itle="std.file"><span class="d_inlinecode donthyphenate notranslate">file<ztpan></a></li><li> �!�!a href="std_format.html"�4itle="std.format"><span class="d_inlinecode donthyphenate notranslate">format<ztpan></a><ul><li> <h7><span class="d_inlinecode donthyphenate notranslate">internal<ztpan></h7><ul><li> �!�!a href="std_format_internal_floats.html"�4itle="std.format.internal.floats"><span class="d_inlinecode donthyphenate notranslate">floats<ztpan></a></li><li> �!�!a href="std_format_internal_read.html"�4itle="std.format.internal.read"><span class="d_inlinecode donthyphenate notranslate">read<ztpan></a></li><li> �!�!a href="std_format_internal_write.html" title="std.format.internal.write"><span class="d_inlinecode donthyphenate notranslate">write</span><tæ> </li><zùl></li><li> �!�!a href="std_format_read.html" title="std.format.read"><span class="d_inlinecode donthyphenate notranslate">read<ztpan></a></li><li> �!�!a href="std_format_spec.html" title="std.format.spec"><span class="d_inlinecode donthyphenate notranslate">spec<ztpan></a></li><li> �!�!a href="std_format_write.html"�4itle="std.format.write"><span class="d_inlinecode donthyphenate notranslate">write</span><tæ> </li><zùl></li><li> �!�!a href="std_functional.html"�4itle="std.functional"><span class="d_inlinecode donthyphenate notranslate">functional<ztpan></a></li><li> �!�!a href="std_getopt.html"�4itle="std.getopt"><span class="d_inlinecode donthyphenate notranslate">getopt<ztpan></a></li><li> �!�!a href="std_int1�(R´�).html"�4itle="std.int1�(R´�)"><span class="d_inlinecode donthyphenate notranslate">int8<ztpan></a></li><li> �!�!a href="std_json.html"�4itle="std.json"><span class="d_inlinecode donthyphenate notranslate">json<ztpan></a></li><li> �!�!a href="std_logger.html"�4itle="std.logger"><span class="d_inlinecode donthyphenate notranslate">logger<ztpan></a><ul><li> <a href="std_logger_core.html"�4itle="std.logger.core"><span class="d_inlinecode donthyphenate notranslate">core</span><tæ><vîi><li> <a href="std_logger_filelogger.html"�4itle="std.logger.filelogger"><span class="d_inlinecode donthyphenate notranslate">filelogger</span><tæ><vîi><li> <a href="std_logger_multilogger.html" title="std.logger.multilogger"><span class="d_inlinecode donthyphenate notranslate">multilogger<ztpan></a></li><li> �!�!a href="std_logger_nulllogger.html" title="std.logger.nulllogger"><span class="d_inlinecode donthyphenate notranslate">nulllogger<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_math.html" title="std.math"><span class="d_inlinecode donthyphenate notranslate">math</span><tæ><ul><li> �!�!a href="std_math_algebraic.html"�4itle="std.math.algebraic"><span class="d_inlinecode donthyphenate notranslate">algebraic</span><tæ><vîi><li> <a href="std_math_constants.html" title="std.math.constants"><span class="d_inlinecode donthyphenate notranslate">constants<ztpan></a></li><li> �!�!a href="std_math_exponential.html"�4itle="std.math.exponential"><span class="d_inlinecode donthyphenate notranslate">exponential</span><tæ><vîi><li> <a href="std_math_hardware.html"�4itle="std.math.hardware"><span class="d_inlinecode donthyphenate notranslate">hardware</span><tæ><vîi><li> <a href="std_math_operations.html"�4itle="std.math.operations"><span class="d_inlinecode donthyphenate notranslate">operations</span><tæ><vîi><li> <a href="std_math_remainder.html" title="std.math.remainder"><span class="d_inlinecode donthyphenate notranslate">remainder<ztpan></a></li><li> �!�!a href="std_math_rounding.html" title="std.math.rounding"><span class="d_inlinecode donthyphenate notranslate">rounding<ztpan></a></li><li> �!�!a href="std_math_traits.html" title="std.math.traits"><span class="d_inlinecode donthyphenate notranslate">traits<ztpan></a></li><li> �!�!a href="std_math_trigonometry.html" title="std.math.trigonometry"><span class="d_inlinecode donthyphenate notranslate">trigonometry<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_mathspecial.html"�4itle="std.mathspecial"><span class="d_inlinecode donthyphenate notranslate">mathspecial<ztpan></a></li><li> �!�!a href="std_meta.html"�4itle="std.meta"><span class="d_inlinecode donthyphenate notranslate">meta<ztpan></a></li><li> �!�!a href="std_mmfile.html"�4itle="std.mmfile"><span class="d_inlinecode donthyphenate notranslate">mmfile<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">net<ztpan></h7><ul><li> �!�!a href="std_net_curl.html"�4itle="std.net.curl"><span class="d_inlinecode donthyphenate notranslate">curl<ztpan></a></li><li> �!�!a href="std_net_isemail.html" title="std.net.isemail"><span class="d_inlinecode donthyphenate notranslate">isemail</span><tæ> </li><zùl></li><li> �!�!a href="std_numeric.html" title="std.numeric"><span class="d_inlinecode donthyphenate notranslate">numeric</span><tæ><vîi><li> <a href="std_outbuffer.html"�4itle="std.outbuffer"><span class="d_inlinecode donthyphenate notranslate">outbuffer<ztpan></a></li><li> �!�!a href="std_parallelism.html" title="std.parallelism"><span class="d_inlinecode donthyphenate notranslate">parallelism</span><tæ><vîi><li> <a href="std_path.html" title="std.path"><span class="d_inlinecode donthyphenate notranslate">path</span><tæ><vîi><li> <a href="std_process.html"�4itle="std.process"><span class="d_inlinecode donthyphenate notranslate">process<ztpan></a></li><li> �!�!a href="std_random.html"�4itle="std.random"><span class="d_inlinecode donthyphenate notranslate">random<ztpan></a></li><li> �!�!a href="std_range.html" title="std.range"><span class="d_inlinecode donthyphenate notranslate">range</span><tæ><ul><li> �!�!a href="std_range_interfaces.html"�4itle="std.range.interfaces"><span class="d_inlinecode donthyphenate notranslate">interfaces<ztpan></a></li><li> �!�!a href="std_range_primitives.html"�4itle="std.range.primitives"><span class="d_inlinecode donthyphenate notranslate">primitives<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_regex.html"�4itle="std.regex"><span class="d_inlinecode donthyphenate notranslate">regex<ztpan></a></li><li> �!�!a href="std_signals.html" title="std.signals"><span class="d_inlinecode donthyphenate notranslate">signals</span><tæ><vîi><li> <a href="std_socket.html" title="std.socket"><span class="d_inlinecode donthyphenate notranslate">socket</span><tæ><vîi><li> <a href="std_stdint.html" title="std.stdint"><span class="d_inlinecode donthyphenate notranslate">stdint</span><tæ><vîi><li> <a href="std_stdio.html"�4itle="std.stdio"><span class="d_inlinecode donthyphenate notranslate">stdio<ztpan></a></li><li> �!�!a href="std_string.html"�4itle="std.string"><span class="d_inlinecode donthyphenate notranslate">string<ztpan></a></li><li> �!�!a href="std_sumtype.html" title="std.sumtype"><span class="d_inlinecode donthyphenate notranslate">sumtype</span><tæ><vîi><li> <a href="std_system.html" title="std.system"><span class="d_inlinecode donthyphenate notranslate">system</span><tæ><vîi><li> <a href="std_traits.html" title="std.traits"><span class="d_inlinecode donthyphenate notranslate">traits</span><tæ><vîi><li> <a href="std_typecons.html" title="std.typecons"><span class="d_inlinecode donthyphenate notranslate">typecons</span><tæ><vîi><li> <a href="std_uni.html"�4itle="std.uni"><span class="d_inlinecode donthyphenate notranslate">uni<ztpan></a></li><li> �!�!a href="std_uri.html" title="std.uri"><span class="d_inlinecode donthyphenate notranslate">uri</span><tæ><vîi><li> <a href="std_utf.html"�4itle="std.utf"><span class="d_inlinecode donthyphenate notranslate">utf<ztpan></a></li><li> �!�!a href="std_uuid.html"�4itle="std.uuid"><span class="d_inlinecode donthyphenate notranslate">uuid<ztpan></a></li><li> �!�!a href="std_variant.html" title="std.variant"><span class="d_inlinecode donthyphenate notranslate">variant</span><tæ><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">windows</span><vv7><ul><li> <a href="std_windows_charset.html"�4itle="std.windows.charset"><span class="d_inlinecode donthyphenate notranslate">charset<ztpan></a></li><li> �!�!a href="std_windows_syserror.html"�4itle="std.windows.syserror"><span class="d_inlinecode donthyphenate notranslate">syserror<ztpan></a> �!�!vîi></ul><vîi><li> <a href="std_zip.html"�4itle="std.zip"><span class="d_inlinecode donthyphenate notranslate">zip<ztpan></a></li><li> �!�!a href="std_zlib.html"�4itle="std.zlib"><span class="d_inlinecode donthyphenate notranslate">zlib<ztpan></a> <vîi></ul> </li> <li class='expand-container modlist-submenu-etc'><a class='expand-toggle' href='#'><span><em class="tt">etc</em><ztpan></a> <ul><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">c<ztpan></h7><ul><li> �!�!a href="etc_c_curl.html"�4itle="etc.c.curl"><span class="d_inlinecode donthyphenate notranslate">curl<ztpan></a></li><li> �!�!a href="etc_c_odbc.html"�4itle="etc.c.odbc"><span class="d_inlinecode donthyphenate notranslate">odbc<ztpan></a><ul><li> <a href="etc_c_odbc_odbc0Õ0¡0é0Ã0É.html"�4itle="etc.c.odbc.odbc3�(N �)><span class="d_inlinecode donthyphenate notranslate">odbc0Õ0¡0é0Ã0É</span><tæ><vîi><li> <a href="etc_c_odbc_odbc64.html"�4itle="etc.c.odbc.odbc64"><span class="d_inlinecode donthyphenate notranslate">odbc64</span><tæ><vîi><li> <a href="etc_c_odbc_sql.html" title="etc.c.odbc.sql"><span class="d_inlinecode donthyphenate notranslate">sql<ztpan></a></li><li> �!�!a href="etc_c_odbc_sqlext.html" title="etc.c.odbc.sqlext"><span class="d_inlinecode donthyphenate notranslate">sqlext<ztpan></a></li><li> �!�!a href="etc_c_odbc_sqltypes.html" title="etc.c.odbc.sqltypes"><span class="d_inlinecode donthyphenate notranslate">sqltypes<ztpan></a></li><li> �!�!a href="etc_c_odbc_sqlucode.html" title="etc.c.odbc.sqlucode"><span class="d_inlinecode donthyphenate notranslate">sqlucode<ztpan></a> �!�!vîi></ul><vîi><li> <a href="etc_c_sqlite3.html"�4itle="etc.c.sqlite0»0ó0Á><span class="d_inlinecode donthyphenate notranslate">sqlite0Ù0ü0¿ztpan></a></li><li> �!�!a href="etc_c_zlib.html"�4itle="etc.c.zlib"><span class="d_inlinecode donthyphenate notranslate">zlib<ztpan></a> �!�!vîi></ul><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">valgrind<ztpan></h7><ul><li> �!�!a href="etc_valgrind_valgrind.html" title="etc.valgrind.valgrind"><span class="d_inlinecode donthyphenate notranslate">valgrind<ztpan></a> �!�!vîi></ul> </li><zùl> <vîi> <li class='expand-container modlist-submenu-core'><a class='expand-toggle' href='#'><span><em class="tt">core<u0m></span><tæ> <ul><li> <a href="core_atomic.html"�4itle="core.atomic"><span class="d_inlinecode donthyphenate notranslate">atomic</span><tæ><vîi><li> <a href="core_attribute.html" title="core.attribute"><span class="d_inlinecode donthyphenate notranslate">attribute<ztpan></a></li><li> �!�!a href="core_bitop.html"�4itle="core.bitop"><span class="d_inlinecode donthyphenate notranslate">bitop</span><tæ><vîi><li> <a href="core_builtins.html"�4itle="core.builtins"><span class="d_inlinecode donthyphenate notranslate">builtins</span><tæ><vîi><li> <a href="core_checkedint.html"�4itle="core.checkedint"><span class="d_inlinecode donthyphenate notranslate">checkedint</span><tæ><vîi><li> <a href="core_cpuid.html" title="core.cpuid"><span class="d_inlinecode donthyphenate notranslate">cpuid<ztpan></a></li><li> �!�!a href="core_demangle.html" title="core.demangle"><span class="d_inlinecode donthyphenate notranslate">demangle<ztpan></a></li><li> �!�!a href="core_exception.html"�4itle="core.exception"><span class="d_inlinecode donthyphenate notranslate">exception</span><tæ><vîi><li> <a href="core_factory.html" title="core.factory"><span class="d_inlinecode donthyphenate notranslate">factory<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">gc</span><vv7><ul><li> <a href="core_gc_config.html" title="core.gc.config"><span class="d_inlinecode donthyphenate notranslate">config</span><tæ><vîi><li> <a href="core_gc_gcinterface.html"�4itle="core.gc.gcinterface"><span class="d_inlinecode donthyphenate notranslate">gcinterface<ztpan></a></li><li> �!�!a href="core_gc_registry.html"�4itle="core.gc.registry"><span class="d_inlinecode donthyphenate notranslate">registry<ztpan></a> �!�!vîi></ul><vîi><li> <a href="core_int1�(R´�).html"�4itle="core.int8"><span class="d_inlinecode donthyphenate notranslate">int1�(R´�)</span><tæ><vîi><li> <a href="core_interpolation.html" title="core.interpolation"><span class="d_inlinecode donthyphenate notranslate">interpolation<ztpan></a></li><li> �!�!a href="core_lifetime.html" title="core.lifetime"><span class="d_inlinecode donthyphenate notranslate">lifetime<ztpan></a></li><li> �!�!a href="core_math.html" title="core.math"><span class="d_inlinecode donthyphenate notranslate">math<ztpan></a></li><li> �!�!a href="core_memory.html" title="core.memory"><span class="d_inlinecode donthyphenate notranslate">memory<ztpan></a></li><li> �!�!a href="core_runtime.html"�4itle="core.runtime"><span class="d_inlinecode donthyphenate notranslate">runtime</span><tæ><vîi><li> <a href="core_simd.html"�4itle="core.simd"><span class="d_inlinecode donthyphenate notranslate">simd</span><tæ><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">stdc<ztpan></h7><ul><li> �!�!a href="core_stdc_assert_.html" title="core.stdc.assert_"><span class="d_inlinecode donthyphenate notranslate">assert_</span><tæ><vîi><li> <a href="core_stdc_complex.html"�4itle="core.stdc.complex"><span class="d_inlinecode donthyphenate notranslate">complex<ztpan></a></li><li> �!�!a href="core_stdc_ctype.html" title="core.stdc.ctype"><span class="d_inlinecode donthyphenate notranslate">ctype</span><tæ><vîi><li> <a href="core_stdc_errno.html"�4itle="core.stdc.errno"><span class="d_inlinecode donthyphenate notranslate">errno<ztpan></a></li><li> �!�!a href="core_stdc_fenv.html"�4itle="core.stdc.fenv"><span class="d_inlinecode donthyphenate notranslate">fenv<ztpan></a></li><li> �!�!a href="core_stdc_float_.html"�4itle="core.stdc.float_"><span class="d_inlinecode donthyphenate notranslate">float_<ztpan></a></li><li> �!�!a href="core_stdc_inttypes.html"�4itle="core.stdc.inttypes"><span class="d_inlinecode donthyphenate notranslate">inttypes<ztpan></a></li><li> �!�!a href="core_stdc_limits.html"�4itle="core.stdc.limits"><span class="d_inlinecode donthyphenate notranslate">limits<ztpan></a></li><li> �!�!a href="core_stdc_locale.html"�4itle="core.stdc.locale"><span class="d_inlinecode donthyphenate notranslate">locale<ztpan></a></li><li> �!�!a href="core_stdc_math.html"�4itle="core.stdc.math"><span class="d_inlinecode donthyphenate notranslate">math<ztpan></a></li><li> �!�!a href="core_stdc_signal.html"�4itle="core.stdc.signal"><span class="d_inlinecode donthyphenate notranslate">signal<ztpan></a></li><li> �!�!a href="core_stdc_stdarg.html"�4itle="core.stdc.stdarg"><span class="d_inlinecode donthyphenate notranslate">stdarg<ztpan></a></li><li> �!�!a href="core_stdc_stdatomic.html" title="core.stdc.stdatomic"><span class="d_inlinecode donthyphenate notranslate">stdatomic</span><tæ><vîi><li> <a href="core_stdc_stddef.html" title="core.stdc.stddef"><span class="d_inlinecode donthyphenate notranslate">stddef</span><tæ><vîi><li> <a href="core_stdc_stdint.html" title="core.stdc.stdint"><span class="d_inlinecode donthyphenate notranslate">stdint</span><tæ><vîi><li> <a href="core_stdc_stdio.html"�4itle="core.stdc.stdio"><span class="d_inlinecode donthyphenate notranslate">stdio<ztpan></a></li><li> �!�!a href="core_stdc_stdlib.html"�4itle="core.stdc.stdlib"><span class="d_inlinecode donthyphenate notranslate">stdlib<ztpan></a></li><li> �!�!a href="core_stdc_string.html"�4itle="core.stdc.string"><span class="d_inlinecode donthyphenate notranslate">string<ztpan></a></li><li> �!�!a href="core_stdc_tgmath.html"�4itle="core.stdc.tgmath"><span class="d_inlinecode donthyphenate notranslate">tgmath<ztpan></a></li><li> �!�!a href="core_stdc_time.html"�4itle="core.stdc.time"><span class="d_inlinecode donthyphenate notranslate">time<ztpan></a></li><li> �!�!a href="core_stdc_wchar_.html"�4itle="core.stdc.wchar_"><span class="d_inlinecode donthyphenate notranslate">wchar_<ztpan></a></li><li> �!�!a href="core_stdc_wctype.html"�4itle="core.stdc.wctype"><span class="d_inlinecode donthyphenate notranslate">wctype<ztpan></a> �!�!vîi></ul><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">stdcpp<ztpan></h7><ul><li> �!�!a href="core_stdcpp_allocator.html" title="core.stdcpp.allocator"><span class="d_inlinecode donthyphenate notranslate">allocator</span><tæ><vîi><li> <a href="core_stdcpp_array.html"�4itle="core.stdcpp.array"><span class="d_inlinecode donthyphenate notranslate">array<ztpan></a></li><li> �!�!a href="core_stdcpp_exception.html" title="core.stdcpp.exception"><span class="d_inlinecode donthyphenate notranslate">exception</span><tæ><vîi><li> <a href="core_stdcpp_memory.html" title="core.stdcpp.memory"><span class="d_inlinecode donthyphenate notranslate">memory</span><tæ><vîi><li> <a href="core_stdcpp_new_.html" title="core.stdcpp.new_"><span class="d_inlinecode donthyphenate notranslate">new_</span><tæ><vîi><li> <a href="core_stdcpp_string.html" title="core.stdcpp.string"><span class="d_inlinecode donthyphenate notranslate">string</span><tæ><vîi><li> <a href="core_stdcpp_string_view.html"�4itle="core.stdcpp.string_view"><span class="d_inlinecode donthyphenate notranslate">string_view<ztpan></a></li><li> �!�!a href="core_stdcpp_type_traits.html" title="core.stdcpp.type_traits"><span class="d_inlinecode donthyphenate notranslate">type_traits</span><tæ><vîi><li> <a href="core_stdcpp_typeinfo.html" title="core.stdcpp.typeinfo"><span class="d_inlinecode donthyphenate notranslate">typeinfo</span><tæ><vîi><li> <a href="core_stdcpp_utility.html"�4itle="core.stdcpp.utility"><span class="d_inlinecode donthyphenate notranslate">utility<ztpan></a></li><li> �!�!a href="core_stdcpp_vector.html"�4itle="core.stdcpp.vector"><span class="d_inlinecode donthyphenate notranslate">vector<ztpan></a></li><li> �!�!a href="core_stdcpp_xutility.html"�4itle="core.stdcpp.xutility"><span class="d_inlinecode donthyphenate notranslate">xutility<ztpan></a> �!�!vîi></ul><vîi><li> <a href="core_sync.html"�4itle="core.sync"><span class="d_inlinecode donthyphenate notranslate">sync</span><tæ><ul><li> �!�!a href="core_sync_barrier.html" title="core.sync.barrier"><span class="d_inlinecode donthyphenate notranslate">barrier</span><tæ><vîi><li> <a href="core_sync_condition.html"�4itle="core.sync.condition"><span class="d_inlinecode donthyphenate notranslate">condition<ztpan></a></li><li> �!�!a href="core_sync_config.html"�4itle="core.sync.config"><span class="d_inlinecode donthyphenate notranslate">config<ztpan></a></li><li> �!�!a href="core_sync_event.html" title="core.sync.event"><span class="d_inlinecode donthyphenate notranslate">event</span><tæ><vîi><li> <a href="core_sync_exception.html"�4itle="core.sync.exception"><span class="d_inlinecode donthyphenate notranslate">exception<ztpan></a></li><li> �!�!a href="core_sync_mutex.html" title="core.sync.mutex"><span class="d_inlinecode donthyphenate notranslate">mutex</span><tæ><vîi><li> <a href="core_sync_rwmutex.html"�4itle="core.sync.rwmutex"><span class="d_inlinecode donthyphenate notranslate">rwmutex<ztpan></a></li><li> �!�!a href="core_sync_semaphore.html" title="core.sync.semaphore"><span class="d_inlinecode donthyphenate notranslate">semaphore</span><tæ> </li><zùl></li><li> �!�!a href="core_thread.html" title="core.thread"><span class="d_inlinecode donthyphenate notranslate">thread<ztpan></a><ul><li> <a href="core_thread_context.html"�4itle="core.thread.context"><span class="d_inlinecode donthyphenate notranslate">context<ztpan></a></li><li> �!�!a href="core_thread_fiber.html" title="core.thread.fiber"><span class="d_inlinecode donthyphenate notranslate">fiber</span><tæ><ul><li> �!�!a href="core_thread_fiber_base.html"�4itle="core.thread.fiber.base"><span class="d_inlinecode donthyphenate notranslate">base<ztpan></a> �!�!vîi></ul><vîi><li> <a href="core_thread_osthread.html" title="core.thread.osthread"><span class="d_inlinecode donthyphenate notranslate">osthread</span><tæ><vîi><li> <a href="core_thread_threadbase.html" title="core.thread.threadbase"><span class="d_inlinecode donthyphenate notranslate">threadbase</span><tæ><vîi><li> <a href="core_thread_threadgroup.html"�4itle="core.thread.threadgroup"><span class="d_inlinecode donthyphenate notranslate">threadgroup<ztpan></a></li><li> �!�!a href="core_thread_types.html" title="core.thread.types"><span class="d_inlinecode donthyphenate notranslate">types</span><tæ> </li><zùl></li><li> �!�!a href="core_time.html" title="core.time"><span class="d_inlinecode donthyphenate notranslate">time<ztpan></a></li><li> �!�!a href="core_vararg.html" title="core.vararg"><span class="d_inlinecode donthyphenate notranslate">vararg<ztpan></a></li><li> �!�!a href="core_volatile.html" title="core.volatile"><span class="d_inlinecode donthyphenate notranslate">volatile<ztpan></a> <vîi></ul> </li> <div class="modlist-internal-separator">Internal API</div> <li class='expand-container modlist-submenu-core'><a class='expand-toggle' href='#'><span><em class="tt">core<u0m></span><tæ> <ul><li> <h7><span class="d_inlinecode donthyphenate notranslate">internal<ztpan></h7><ul><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">array<ztpan></h7><ul><li> �!�!a href="core_internal_array_appending.html" title="core.internal.array.appending"><span class="d_inlinecode donthyphenate notranslate">appending</span><tæ><vîi><li> <a href="core_internal_array_arrayassign.html"�4itle="core.internal.array.arrayassign"><span class="d_inlinecode donthyphenate notranslate">arrayassign<ztpan></a></li><li> �!�!a href="core_internal_array_capacity.html"�4itle="core.internal.array.capacity"><span class="d_inlinecode donthyphenate notranslate">capacity<ztpan></a></li><li> �!�!a href="core_internal_array_casting.html" title="core.internal.array.casting"><span class="d_inlinecode donthyphenate notranslate">casting</span><tæ><vîi><li> <a href="core_internal_array_comparison.html" title="core.internal.array.comparison"><span class="d_inlinecode donthyphenate notranslate">comparison</span><tæ><vîi><li> <a href="core_internal_array_concatenation.html"�4itle="core.internal.array.concatenation"><span class="d_inlinecode donthyphenate notranslate">concatenation<ztpan></a></li><li> �!�!a href="core_internal_array_construction.html"�4itle="core.internal.array.construction"><span class="d_inlinecode donthyphenate notranslate">construction<ztpan></a></li><li> �!�!a href="core_internal_array_duplication.html" title="core.internal.array.duplication"><span class="d_inlinecode donthyphenate notranslate">duplication</span><tæ><vîi><li> <a href="core_internal_array_equality.html" title="core.internal.array.equality"><span class="d_inlinecode donthyphenate notranslate">equality</span><tæ><vîi><li> <a href="core_internal_array_operations.html" title="core.internal.array.operations"><span class="d_inlinecode donthyphenate notranslate">operations</span><tæ><vîi><li> <a href="core_internal_array_utils.html"�4itle="core.internal.array.utils"><span class="d_inlinecode donthyphenate notranslate">utils<ztpan></a> �!�!vîi></ul><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">util<ztpan></h7><ul><li> �!�!a href="core_internal_util_array.html"�4itle="core.internal.util.array"><span class="d_inlinecode donthyphenate notranslate">array</span><tæ><vîi><li> <a href="core_internal_util_math.html"�4itle="core.internal.util.math"><span class="d_inlinecode donthyphenate notranslate">math</span><tæ> </li><zùl> �!�!vîi></ul> </li><zùl> <vîi> <li class='expand-container modlist-submenu-dmd'><a class='expand-toggle' href='#'><span><em class="tt">dmd<u0m></span><tæ> <ul><li> <a href="dmd_access.html" title="dmd.access"><span class="d_inlinecode donthyphenate notranslate">access</span><tæ><vîi><li> <a href="dmd_aggregate.html"�4itle="dmd.aggregate"><span class="d_inlinecode donthyphenate notranslate">aggregate<ztpan></a></li><li> �!�!a href="dmd_aliasthis.html" title="dmd.aliasthis"><span class="d_inlinecode donthyphenate notranslate">aliasthis</span><tæ><vîi><li> <a href="dmd_argtypes_aarch64.html" title="dmd.argtypes_aarch64"><span class="d_inlinecode donthyphenate notranslate">argtypes_aarch64</span><tæ><vîi><li> <a href="dmd_argtypes_sysv_x64.html"�4itle="dmd.argtypes_sysv_x64"><span class="d_inlinecode donthyphenate notranslate">argtypes_sysv_x64<ztpan></a></li><li> �!�!a href="dmd_argtypes_x86.html"�4itle="dmd.argtypes_x86"><span class="d_inlinecode donthyphenate notranslate">argtypes_x86<ztpan></a></li><li> �!�!a href="dmd_arrayop.html" title="dmd.arrayop"><span class="d_inlinecode donthyphenate notranslate">arrayop</span><tæ><vîi><li> <a href="dmd_arraytypes.html" title="dmd.arraytypes"><span class="d_inlinecode donthyphenate notranslate">arraytypes</span><tæ><vîi><li> <a href="dmd_ast_node.html" title="dmd.ast_node"><span class="d_inlinecode donthyphenate notranslate">ast_node</span><tæ><vîi><li> <a href="dmd_astbase.html"�4itle="dmd.astbase"><span class="d_inlinecode donthyphenate notranslate">astbase<ztpan></a></li><li> �!�!a href="dmd_astcodegen.html"�4itle="dmd.astcodegen"><span class="d_inlinecode donthyphenate notranslate">astcodegen<ztpan></a></li><li> �!�!a href="dmd_astenums.html"�4itle="dmd.astenums"><span class="d_inlinecode donthyphenate notranslate">astenums<ztpan></a></li><li> �!�!a href="dmd_asttypename.html" title="dmd.asttypename"><span class="d_inlinecode donthyphenate notranslate">asttypename</span><tæ><vîi><li> <a href="dmd_attrib.html" title="dmd.attrib"><span class="d_inlinecode donthyphenate notranslate">attrib</span><tæ><vîi><li> <a href="dmd_attribsem.html"�4itle="dmd.attribsem"><span class="d_inlinecode donthyphenate notranslate">attribsem<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">backend<ztpan></h7><ul><li> �!�!a href="dmd_backend_aarray.html"�4itle="dmd.backend.aarray"><span class="d_inlinecode donthyphenate notranslate">aarray<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">arm<ztpan></h7><ul><li> �!�!a href="dmd_backend_arm_cod1.html"�4itle="dmd.backend.arm.cod1"><span class="d_inlinecode donthyphenate notranslate">cod²ztpan></a></li><li> �!�!a href="dmd_backend_arm_cod2.html"�4itle="dmd.backend.arm.cod2"><span class="d_inlinecode donthyphenate notranslate">cod�(vã�)ztpan></a></li><li> �!�!a href="dmd_backend_arm_cod3.html"�4itle="dmd.backend.arm.cod3"><span class="d_inlinecode donthyphenate notranslate">cod0Ù0ü0¿ztpan></a></li><li> �!�!a href="dmd_backend_arm_cod4.html"�4itle="dmd.backend.arm.cod4"><span class="d_inlinecode donthyphenate notranslate">cod4<ztpan></a></li><li> �!�!a href="dmd_backend_arm_disasmarm.html" title="dmd.backend.arm.disasmarm"><span class="d_inlinecode donthyphenate notranslate">disasmarm</span><tæ><vîi><li> <a href="dmd_backend_arm_instr.html"�4itle="dmd.backend.arm.instr"><span class="d_inlinecode donthyphenate notranslate">instr<ztpan></a> �!�!vîi></ul><vîi><li> <a href="dmd_backend_backconfig.html" title="dmd.backend.backconfig"><span class="d_inlinecode donthyphenate notranslate">backconfig</span><tæ><vîi><li> <a href="dmd_backend_barray.html" title="dmd.backend.barray"><span class="d_inlinecode donthyphenate notranslate">barray</span><tæ><vîi><li> <a href="dmd_backend_bcomplex.html" title="dmd.backend.bcomplex"><span class="d_inlinecode donthyphenate notranslate">bcomplex</span><tæ><vîi><li> <a href="dmd_backend_blockopt.html" title="dmd.backend.blockopt"><span class="d_inlinecode donthyphenate notranslate">blockopt</span><tæ><vîi><li> <a href="dmd_backend_cc.html" title="dmd.backend.cc"><span class="d_inlinecode donthyphenate notranslate">cc</span><tæ><vîi><li> <a href="dmd_backend_cdef.html" title="dmd.backend.cdef"><span class="d_inlinecode donthyphenate notranslate">cdef</span><tæ><vîi><li> <a href="dmd_backend_cg.html" title="dmd.backend.cg"><span class="d_inlinecode donthyphenate notranslate">cg</span><tæ><vîi><li> <a href="dmd_backend_cgcs.html" title="dmd.backend.cgcs"><span class="d_inlinecode donthyphenate notranslate">cgcs</span><tæ><vîi><li> <a href="dmd_backend_cgcse.html"�4itle="dmd.backend.cgcse"><span class="d_inlinecode donthyphenate notranslate">cgcse<ztpan></a></li><li> �!�!a href="dmd_backend_cgcv.html"�4itle="dmd.backend.cgcv"><span class="d_inlinecode donthyphenate notranslate">cgcv<ztpan></a></li><li> �!�!a href="dmd_backend_cgelem.html"�4itle="dmd.backend.cgelem"><span class="d_inlinecode donthyphenate notranslate">cgelem<ztpan></a></li><li> �!�!a href="dmd_backend_cgen.html"�4itle="dmd.backend.cgen"><span class="d_inlinecode donthyphenate notranslate">cgen<ztpan></a></li><li> �!�!a href="dmd_backend_cgsched.html" title="dmd.backend.cgsched"><span class="d_inlinecode donthyphenate notranslate">cgsched</span><tæ><vîi><li> <a href="dmd_backend_code.html" title="dmd.backend.code"><span class="d_inlinecode donthyphenate notranslate">code</span><tæ><vîi><li> <a href="dmd_backend_codebuilder.html"�4itle="dmd.backend.codebuilder"><span class="d_inlinecode donthyphenate notranslate">codebuilder<ztpan></a></li><li> �!�!a href="dmd_backend_cv4.html" title="dmd.backend.cv4"><span class="d_inlinecode donthyphenate notranslate">cv4</span><tæ><vîi><li> <a href="dmd_backend_cv8.html"�4itle="dmd.backend.cv8"><span class="d_inlinecode donthyphenate notranslate">cv8<ztpan></a></li><li> �!�!a href="dmd_backend_dcgcv.html" title="dmd.backend.dcgcv"><span class="d_inlinecode donthyphenate notranslate">dcgcv</span><tæ><vîi><li> <a href="dmd_backend_dcode.html"�4itle="dmd.backend.dcode"><span class="d_inlinecode donthyphenate notranslate">dcode<ztpan></a></li><li> �!�!a href="dmd_backend_debugprint.html"�4itle="dmd.backend.debugprint"><span class="d_inlinecode donthyphenate notranslate">debugprint<ztpan></a></li><li> �!�!a href="dmd_backend_divcoeff.html"�4itle="dmd.backend.divcoeff"><span class="d_inlinecode donthyphenate notranslate">divcoeff<ztpan></a></li><li> �!�!a href="dmd_backend_dlist.html" title="dmd.backend.dlist"><span class="d_inlinecode donthyphenate notranslate">dlist</span><tæ><vîi><li> <a href="dmd_backend_dout.html" title="dmd.backend.dout"><span class="d_inlinecode donthyphenate notranslate">dout</span><tæ><vîi><li> <a href="dmd_backend_drtlsym.html"�4itle="dmd.backend.drtlsym"><span class="d_inlinecode donthyphenate notranslate">drtlsym<ztpan></a></li><li> �!�!a href="dmd_backend_dt.html"�4itle="dmd.backend.dt"><span class="d_inlinecode donthyphenate notranslate">dt<ztpan></a></li><li> �!�!a href="dmd_backend_dtype.html" title="dmd.backend.dtype"><span class="d_inlinecode donthyphenate notranslate">dtype</span><tæ><vîi><li> <a href="dmd_backend_dvarstats.html"�4itle="dmd.backend.dvarstats"><span class="d_inlinecode donthyphenate notranslate">dvarstats<ztpan></a></li><li> �!�!a href="dmd_backend_dvec.html"�4itle="dmd.backend.dvec"><span class="d_inlinecode donthyphenate notranslate">dvec<ztpan></a></li><li> �!�!a href="dmd_backend_dwarf.html" title="dmd.backend.dwarf"><span class="d_inlinecode donthyphenate notranslate">dwarf</span><tæ><vîi><li> <a href="dmd_backend_dwarf�(‘Ñ�)html" title="dmd.backend.dwarf�(N �)><span class="d_inlinecode donthyphenate notranslate">dwarf2</span><tæ><vîi><li> <a href="dmd_backend_dwarfdbginf.html"�4itle="dmd.backend.dwarfdbginf"><span class="d_inlinecode donthyphenate notranslate">dwarfdbginf<ztpan></a></li><li> �!�!a href="dmd_backend_dwarfeh.html" title="dmd.backend.dwarfeh"><span class="d_inlinecode donthyphenate notranslate">dwarfeh</span><tæ><vîi><li> <a href="dmd_backend_ee.html" title="dmd.backend.ee"><span class="d_inlinecode donthyphenate notranslate">ee</span><tæ><vîi><li> <a href="dmd_backend_eh.html" title="dmd.backend.eh"><span class="d_inlinecode donthyphenate notranslate">eh</span><tæ><vîi><li> <a href="dmd_backend_el.html" title="dmd.backend.el"><span class="d_inlinecode donthyphenate notranslate">el</span><tæ><vîi><li> <a href="dmd_backend_elem.html" title="dmd.backend.elem"><span class="d_inlinecode donthyphenate notranslate">elem</span><tæ><vîi><li> <a href="dmd_backend_elfobj.html" title="dmd.backend.elfobj"><span class="d_inlinecode donthyphenate notranslate">elfobj</span><tæ><vîi><li> <a href="dmd_backend_elpicpie.html" title="dmd.backend.elpicpie"><span class="d_inlinecode donthyphenate notranslate">elpicpie</span><tæ><vîi><li> <a href="dmd_backend_evalu8.html" title="dmd.backend.evalu8"><span class="d_inlinecode donthyphenate notranslate">evalu8</span><tæ><vîi><li> <a href="dmd_backend_fp.html" title="dmd.backend.fp"><span class="d_inlinecode donthyphenate notranslate">fp</span><tæ><vîi><li> <a href="dmd_backend_gdag.html" title="dmd.backend.gdag"><span class="d_inlinecode donthyphenate notranslate">gdag</span><tæ><vîi><li> <a href="dmd_backend_gflow.html"�4itle="dmd.backend.gflow"><span class="d_inlinecode donthyphenate notranslate">gflow<ztpan></a></li><li> �!�!a href="dmd_backend_global.html"�4itle="dmd.backend.global"><span class="d_inlinecode donthyphenate notranslate">global<ztpan></a></li><li> �!�!a href="dmd_backend_glocal.html"�4itle="dmd.backend.glocal"><span class="d_inlinecode donthyphenate notranslate">glocal<ztpan></a></li><li> �!�!a href="dmd_backend_gloop.html" title="dmd.backend.gloop"><span class="d_inlinecode donthyphenate notranslate">gloop</span><tæ><vîi><li> <a href="dmd_backend_go.html" title="dmd.backend.go"><span class="d_inlinecode donthyphenate notranslate">go</span><tæ><vîi><li> <a href="dmd_backend_goh.html"�4itle="dmd.backend.goh"><span class="d_inlinecode donthyphenate notranslate">goh<ztpan></a></li><li> �!�!a href="dmd_backend_gother.html"�4itle="dmd.backend.gother"><span class="d_inlinecode donthyphenate notranslate">gother<ztpan></a></li><li> �!�!a href="dmd_backend_gsroa.html" title="dmd.backend.gsroa"><span class="d_inlinecode donthyphenate notranslate">gsroa</span><tæ><vîi><li> <a href="dmd_backend_iasm.html" title="dmd.backend.iasm"><span class="d_inlinecode donthyphenate notranslate">iasm</span><tæ><vîi><li> <a href="dmd_backend_inliner.html"�4itle="dmd.backend.inliner"><span class="d_inlinecode donthyphenate notranslate">inliner<ztpan></a></li><li> �!�!a href="dmd_backend_mach.html"�4itle="dmd.backend.mach"><span class="d_inlinecode donthyphenate notranslate">mach<ztpan></a></li><li> �!�!a href="dmd_backend_machobj.html" title="dmd.backend.machobj"><span class="d_inlinecode donthyphenate notranslate">machobj</span><tæ><vîi><li> <a href="dmd_backend_melf.html" title="dmd.backend.melf"><span class="d_inlinecode donthyphenate notranslate">melf</span><tæ><vîi><li> <a href="dmd_backend_mem.html"�4itle="dmd.backend.mem"><span class="d_inlinecode donthyphenate notranslate">mem<ztpan></a></li><li> �!�!a href="dmd_backend_mscoff.html"�4itle="dmd.backend.mscoff"><span class="d_inlinecode donthyphenate notranslate">mscoff<ztpan></a></li><li> �!�!a href="dmd_backend_mscoffobj.html" title="dmd.backend.mscoffobj"><span class="d_inlinecode donthyphenate notranslate">mscoffobj</span><tæ><vîi><li> <a href="dmd_backend_obj.html"�4itle="dmd.backend.obj"><span class="d_inlinecode donthyphenate notranslate">obj<ztpan></a></li><li> �!�!a href="dmd_backend_oper.html"�4itle="dmd.backend.oper"><span class="d_inlinecode donthyphenate notranslate">oper<ztpan></a></li><li> �!�!a href="dmd_backend_pdata.html" title="dmd.backend.pdata"><span class="d_inlinecode donthyphenate notranslate">pdata</span><tæ><vîi><li> <a href="dmd_backend_ptrntab.html"�4itle="dmd.backend.ptrntab"><span class="d_inlinecode donthyphenate notranslate">ptrntab<ztpan></a></li><li> �!�!a href="dmd_backend_rtlsym.html"�4itle="dmd.backend.rtlsym"><span class="d_inlinecode donthyphenate notranslate">rtlsym<ztpan></a></li><li> �!�!a href="dmd_backend_symbol.html"�4itle="dmd.backend.symbol"><span class="d_inlinecode donthyphenate notranslate">symbol<ztpan></a></li><li> �!�!a href="dmd_backend_symtab.html"�4itle="dmd.backend.symtab"><span class="d_inlinecode donthyphenate notranslate">symtab<ztpan></a></li><li> �!�!a href="dmd_backend_ty.html"�4itle="dmd.backend.ty"><span class="d_inlinecode donthyphenate notranslate">ty<ztpan></a></li><li> �!�!a href="dmd_backend_type.html"�4itle="dmd.backend.type"><span class="d_inlinecode donthyphenate notranslate">type<ztpan></a></li><li> �!�!a href="dmd_backend_util�(‘Ñ�)html" title="dmd.backend.util2"><span class="d_inlinecode donthyphenate notranslate">util2</span><tæ><vîi><li> <a href="dmd_backend_var.html"�4itle="dmd.backend.var"><span class="d_inlinecode donthyphenate notranslate">var<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">x86<ztpan></h7><ul><li> �!�!a href="dmd_backend_x86_cg87.html"�4itle="dmd.backend.x86.cg87"><span class="d_inlinecode donthyphenate notranslate">cg87<ztpan></a></li><li> �!�!a href="dmd_backend_x86_cgcod.html" title="dmd.backend.x86.cgcod"><span class="d_inlinecode donthyphenate notranslate">cgcod</span><tæ><vîi><li> <a href="dmd_backend_x86_cgreg.html"�4itle="dmd.backend.x86.cgreg"><span class="d_inlinecode donthyphenate notranslate">cgreg<ztpan></a></li><li> �!�!a href="dmd_backend_x86_cgxmm.html" title="dmd.backend.x86.cgxmm"><span class="d_inlinecode donthyphenate notranslate">cgxmm</span><tæ><vîi><li> <a href="dmd_backend_x86_cod1.html" title="dmd.backend.x86.cod1"><span class="d_inlinecode donthyphenate notranslate">cod1</span><tæ><vîi><li> <a href="dmd_backend_x86_cod�(‘Ñ�)html" title="dmd.backend.x86.cod�(N �)><span class="d_inlinecode donthyphenate notranslate">cod2</span><tæ><vîi><li> <a href="dmd_backend_x86_cod0Ô0¢0¹0È0ëhtml" title="dmd.backend.x86.cod0»0ó0Á><span class="d_inlinecode donthyphenate notranslate">cod3</span><tæ><vîi><li> <a href="dmd_backend_x86_cod4.html" title="dmd.backend.x86.cod4"><span class="d_inlinecode donthyphenate notranslate">cod4</span><tæ><vîi><li> <a href="dmd_backend_x86_cod5.html" title="dmd.backend.x86.cod5"><span class="d_inlinecode donthyphenate notranslate">cod5</span><tæ><vîi><li> <a href="dmd_backend_x86_code_x86.html" title="dmd.backend.x86.code_x86"><span class="d_inlinecode donthyphenate notranslate">code_x86</span><tæ><vîi><li> <a href="dmd_backend_x86_disasm86.html" title="dmd.backend.x86.disasm86"><span class="d_inlinecode donthyphenate notranslate">disasm86</span><tæ><vîi><li> <a href="dmd_backend_x86_nteh.html" title="dmd.backend.x86.nteh"><span class="d_inlinecode donthyphenate notranslate">nteh</span><tæ><vîi><li> <a href="dmd_backend_x86_xmm.html"�4itle="dmd.backend.x86.xmm"><span class="d_inlinecode donthyphenate notranslate">xmm<ztpan></a> �!�!vîi></ul> </li><zùl></li><li> �!�!a href="dmd_blockexit.html" title="dmd.blockexit"><span class="d_inlinecode donthyphenate notranslate">blockexit</span><tæ><vîi><li> <a href="dmd_builtin.html"�4itle="dmd.builtin"><span class="d_inlinecode donthyphenate notranslate">builtin<ztpan></a></li><li> �!�!a href="dmd_canthrow.html"�4itle="dmd.canthrow"><span class="d_inlinecode donthyphenate notranslate">canthrow<ztpan></a></li><li> �!�!a href="dmd_chkformat.html" title="dmd.chkformat"><span class="d_inlinecode donthyphenate notranslate">chkformat</span><tæ><vîi><li> <a href="dmd_cli.html"�4itle="dmd.cli"><span class="d_inlinecode donthyphenate notranslate">cli<ztpan></a></li><li> �!�!a href="dmd_clone.html" title="dmd.clone"><span class="d_inlinecode donthyphenate notranslate">clone</span><tæ><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">common<ztpan></h7><ul><li> �!�!a href="dmd_common_bitfields.html"�4itle="dmd.common.bitfields"><span class="d_inlinecode donthyphenate notranslate">bitfields</span><tæ><vîi><li> <a href="dmd_common_blake3.html"�4itle="dmd.common.blake0»0ó0Á><span class="d_inlinecode donthyphenate notranslate">blake3</span><tæ><vîi><li> <a href="dmd_common_charactertables.html" title="dmd.common.charactertables"><span class="d_inlinecode donthyphenate notranslate">charactertables<ztpan></a></li><li> �!�!a href="dmd_common_file.html" title="dmd.common.file"><span class="d_inlinecode donthyphenate notranslate">file<ztpan></a></li><li> �!�!a href="dmd_common_identifiertables.html" title="dmd.common.identifiertables"><span class="d_inlinecode donthyphenate notranslate">identifiertables<ztpan></a></li><li> �!�!a href="dmd_common_int8.html" title="dmd.common.int1�(R´�)"><span class="d_inlinecode donthyphenate notranslate">int8<ztpan></a></li><li> �!�!a href="dmd_common_outbuffer.html"�4itle="dmd.common.outbuffer"><span class="d_inlinecode donthyphenate notranslate">outbuffer</span><tæ><vîi><li> <a href="dmd_common_smallbuffer.html" title="dmd.common.smallbuffer"><span class="d_inlinecode donthyphenate notranslate">smallbuffer<ztpan></a> �!�!vîi></ul><vîi><li> <a href="dmd_compiler.html" title="dmd.compiler"><span class="d_inlinecode donthyphenate notranslate">compiler</span><tæ><vîi><li> <a href="dmd_cond.html" title="dmd.cond"><span class="d_inlinecode donthyphenate notranslate">cond</span><tæ><vîi><li> <a href="dmd_console.html"�4itle="dmd.console"><span class="d_inlinecode donthyphenate notranslate">console<ztpan></a></li><li> �!�!a href="dmd_constfold.html" title="dmd.constfold"><span class="d_inlinecode donthyphenate notranslate">constfold</span><tæ><vîi><li> <a href="dmd_cparse.html" title="dmd.cparse"><span class="d_inlinecode donthyphenate notranslate">cparse</span><tæ><vîi><li> <a href="dmd_cpreprocess.html"�4itle="dmd.cpreprocess"><span class="d_inlinecode donthyphenate notranslate">cpreprocess<ztpan></a></li><li> �!�!a href="dmd_ctfeexpr.html"�4itle="dmd.ctfeexpr"><span class="d_inlinecode donthyphenate notranslate">ctfeexpr<ztpan></a></li><li> �!�!a href="dmd_ctorflow.html"�4itle="dmd.ctorflow"><span class="d_inlinecode donthyphenate notranslate">ctorflow<ztpan></a></li><li> �!�!a href="dmd_cxxfrontend.html" title="dmd.cxxfrontend"><span class="d_inlinecode donthyphenate notranslate">cxxfrontend</span><tæ><vîi><li> <a href="dmd_dcast.html"�4itle="dmd.dcast"><span class="d_inlinecode donthyphenate notranslate">dcast<ztpan></a></li><li> �!�!a href="dmd_dclass.html"�4itle="dmd.dclass"><span class="d_inlinecode donthyphenate notranslate">dclass<ztpan></a></li><li> �!�!a href="dmd_declaration.html" title="dmd.declaration"><span class="d_inlinecode donthyphenate notranslate">declaration</span><tæ><vîi><li> <a href="dmd_delegatize.html" title="dmd.delegatize"><span class="d_inlinecode donthyphenate notranslate">delegatize</span><tæ><vîi><li> <a href="dmd_denum.html"�4itle="dmd.denum"><span class="d_inlinecode donthyphenate notranslate">denum<ztpan></a></li><li> �!�!a href="dmd_deps.html"�4itle="dmd.deps"><span class="d_inlinecode donthyphenate notranslate">deps<ztpan></a></li><li> �!�!a href="dmd_dimport.html" title="dmd.dimport"><span class="d_inlinecode donthyphenate notranslate">dimport</span><tæ><vîi><li> <a href="dmd_dinifile.html" title="dmd.dinifile"><span class="d_inlinecode donthyphenate notranslate">dinifile</span><tæ><vîi><li> <a href="dmd_dinterpret.html" title="dmd.dinterpret"><span class="d_inlinecode donthyphenate notranslate">dinterpret</span><tæ><vîi><li> <a href="dmd_dmacro.html" title="dmd.dmacro"><span class="d_inlinecode donthyphenate notranslate">dmacro</span><tæ><vîi><li> <a href="dmd_dmdparams.html"�4itle="dmd.dmdparams"><span class="d_inlinecode donthyphenate notranslate">dmdparams<ztpan></a></li><li> �!�!a href="dmd_dmodule.html" title="dmd.dmodule"><span class="d_inlinecode donthyphenate notranslate">dmodule</span><tæ><vîi><li> <a href="dmd_dmsc.html" title="dmd.dmsc"><span class="d_inlinecode donthyphenate notranslate">dmsc</span><tæ><vîi><li> <a href="dmd_doc.html"�4itle="dmd.doc"><span class="d_inlinecode donthyphenate notranslate">doc<ztpan></a></li><li> �!�!a href="dmd_dscope.html"�4itle="dmd.dscope"><span class="d_inlinecode donthyphenate notranslate">dscope<ztpan></a></li><li> �!�!a href="dmd_dstruct.html" title="dmd.dstruct"><span class="d_inlinecode donthyphenate notranslate">dstruct</span><tæ><vîi><li> <a href="dmd_dsymbol.html"�4itle="dmd.dsymbol"><span class="d_inlinecode donthyphenate notranslate">dsymbol<ztpan></a></li><li> �!�!a href="dmd_dsymbolsem.html"�4itle="dmd.dsymbolsem"><span class="d_inlinecode donthyphenate notranslate">dsymbolsem<ztpan></a></li><li> �!�!a href="dmd_dtemplate.html" title="dmd.dtemplate"><span class="d_inlinecode donthyphenate notranslate">dtemplate</span><tæ><vîi><li> <a href="dmd_dtoh.html" title="dmd.dtoh"><span class="d_inlinecode donthyphenate notranslate">dtoh</span><tæ><vîi><li> <a href="dmd_dversion.html" title="dmd.dversion"><span class="d_inlinecode donthyphenate notranslate">dversion</span><tæ><vîi><li> <a href="dmd_er.html" title="dmd.er"><span class="d_inlinecode donthyphenate notranslate">e2ir</span><tæ><vîi><li> <a href="dmd_entity.html" title="dmd.entity"><span class="d_inlinecode donthyphenate notranslate">entity</span><tæ><vîi><li> <a href="dmd_enumsem.html"�4itle="dmd.enumsem"><span class="d_inlinecode donthyphenate notranslate">enumsem<ztpan></a></li><li> �!�!a href="dmd_errors.html"�4itle="dmd.errors"><span class="d_inlinecode donthyphenate notranslate">errors<ztpan></a></li><li> �!�!a href="dmd_errorsink.html" title="dmd.errorsink"><span class="d_inlinecode donthyphenate notranslate">errorsink</span><tæ><vîi><li> <a href="dmd_escape.html" title="dmd.escape"><span class="d_inlinecode donthyphenate notranslate">escape</span><tæ><vîi><li> <a href="dmd_expression.html" title="dmd.expression"><span class="d_inlinecode donthyphenate notranslate">expression</span><tæ><vîi><li> <a href="dmd_expressionsem.html"�4itle="dmd.expressionsem"><span class="d_inlinecode donthyphenate notranslate">expressionsem<ztpan></a></li><li> �!�!a href="dmd_file_manager.html"�4itle="dmd.file_manager"><span class="d_inlinecode donthyphenate notranslate">file_manager<ztpan></a></li><li> �!�!a href="dmd_frontend.html"�4itle="dmd.frontend"><span class="d_inlinecode donthyphenate notranslate">frontend<ztpan></a></li><li> �!�!a href="dmd_func.html"�4itle="dmd.func"><span class="d_inlinecode donthyphenate notranslate">func<ztpan></a></li><li> �!�!a href="dmd_funcsem.html" title="dmd.funcsem"><span class="d_inlinecode donthyphenate notranslate">funcsem</span><tæ><vîi><li> <a href="dmd_globals.html"�4itle="dmd.globals"><span class="d_inlinecode donthyphenate notranslate">globals<ztpan></a></li><li> �!�!a href="dmd_glue.html"�4itle="dmd.glue"><span class="d_inlinecode donthyphenate notranslate">glue<ztpan></a></li><li> �!�!a href="dmd_gluelayer.html" title="dmd.gluelayer"><span class="d_inlinecode donthyphenate notranslate">gluelayer</span><tæ><vîi><li> <a href="dmd_hdrgen.html" title="dmd.hdrgen"><span class="d_inlinecode donthyphenate notranslate">hdrgen</span><tæ><vîi><li> <a href="dmd_iasm.html" title="dmd.iasm"><span class="d_inlinecode donthyphenate notranslate">iasm</span><tæ><vîi><li> <a href="dmd_iasmdmd.html"�4itle="dmd.iasmdmd"><span class="d_inlinecode donthyphenate notranslate">iasmdmd<ztpan></a></li><li> �!�!a href="dmd_iasmgcc.html" title="dmd.iasmgcc"><span class="d_inlinecode donthyphenate notranslate">iasmgcc</span><tæ><vîi><li> <a href="dmd_id.html" title="dmd.id"><span class="d_inlinecode donthyphenate notranslate">id</span><tæ><vîi><li> <a href="dmd_identifier.html" title="dmd.identifier"><span class="d_inlinecode donthyphenate notranslate">identifier</span><tæ><vîi><li> <a href="dmd_impcnvtab.html"�4itle="dmd.impcnvtab"><span class="d_inlinecode donthyphenate notranslate">impcnvtab<ztpan></a></li><li> �!�!a href="dmd_imphint.html" title="dmd.imphint"><span class="d_inlinecode donthyphenate notranslate">imphint</span><tæ><vîi><li> <a href="dmd_importc.html"�4itle="dmd.importc"><span class="d_inlinecode donthyphenate notranslate">importc<ztpan></a></li><li> �!�!a href="dmd_init.html"�4itle="dmd.init"><span class="d_inlinecode donthyphenate notranslate">init<ztpan></a></li><li> �!�!a href="dmd_initsem.html" title="dmd.initsem"><span class="d_inlinecode donthyphenate notranslate">initsem</span><tæ><vîi><li> <a href="dmd_inline.html" title="dmd.inline"><span class="d_inlinecode donthyphenate notranslate">inline</span><tæ><vîi><li> <a href="dmd_inlinecost.html" title="dmd.inlinecost"><span class="d_inlinecode donthyphenate notranslate">inlinecost</span><tæ><vîi><li> <a href="dmd_intrange.html" title="dmd.intrange"><span class="d_inlinecode donthyphenate notranslate">intrange</span><tæ><vîi><li> <a href="dmd_json.html" title="dmd.json"><span class="d_inlinecode donthyphenate notranslate">json</span><tæ><vîi><li> <a href="dmd_lambdacomp.html" title="dmd.lambdacomp"><span class="d_inlinecode donthyphenate notranslate">lambdacomp</span><tæ><vîi><li> <a href="dmd_lexer.html"�4itle="dmd.lexer"><span class="d_inlinecode donthyphenate notranslate">lexer<ztpan></a></li><li> �!�!a href="dmd_lib.html" title="dmd.lib"><span class="d_inlinecode donthyphenate notranslate">lib</span><tæ><ul><li> �!�!a href="dmd_lib_elf.html" title="dmd.lib.elf"><span class="d_inlinecode donthyphenate notranslate">elf</span><tæ><vîi><li> <a href="dmd_lib_mach.html" title="dmd.lib.mach"><span class="d_inlinecode donthyphenate notranslate">mach</span><tæ><vîi><li> <a href="dmd_lib_mscoff.html" title="dmd.lib.mscoff"><span class="d_inlinecode donthyphenate notranslate">mscoff</span><tæ><vîi><li> <a href="dmd_lib_scanelf.html"�4itle="dmd.lib.scanelf"><span class="d_inlinecode donthyphenate notranslate">scanelf<ztpan></a></li><li> �!�!a href="dmd_lib_scanmach.html"�4itle="dmd.lib.scanmach"><span class="d_inlinecode donthyphenate notranslate">scanmach<ztpan></a></li><li> �!�!a href="dmd_lib_scanmscoff.html"�4itle="dmd.lib.scanmscoff"><span class="d_inlinecode donthyphenate notranslate">scanmscoff<ztpan></a> �!�!vîi></ul><vîi><li> <a href="dmd_link.html" title="dmd.link"><span class="d_inlinecode donthyphenate notranslate">link</span><tæ><vîi><li> <a href="dmd_location.html" title="dmd.location"><span class="d_inlinecode donthyphenate notranslate">location</span><tæ><vîi><li> <a href="dmd_main.html" title="dmd.main"><span class="d_inlinecode donthyphenate notranslate">main</span><tæ><vîi><li> <a href="dmd_mangle.html" title="dmd.mangle"><span class="d_inlinecode donthyphenate notranslate">mangle</span><tæ><ul><li> �!�!a href="dmd_mangle_basic.html"�4itle="dmd.mangle.basic"><span class="d_inlinecode donthyphenate notranslate">basic</span><tæ><vîi><li> <a href="dmd_mangle_cpp.html" title="dmd.mangle.cpp"><span class="d_inlinecode donthyphenate notranslate">cpp<ztpan></a></li><li> �!�!a href="dmd_mangle_cppwin.html" title="dmd.mangle.cppwin"><span class="d_inlinecode donthyphenate notranslate">cppwin<ztpan></a> �!�!vîi></ul><vîi><li> <a href="dmd_mars.html" title="dmd.mars"><span class="d_inlinecode donthyphenate notranslate">mars</span><tæ><vîi><li> <a href="dmd_mtype.html"�4itle="dmd.mtype"><span class="d_inlinecode donthyphenate notranslate">mtype<ztpan></a></li><li> �!�!a href="dmd_mustuse.html" title="dmd.mustuse"><span class="d_inlinecode donthyphenate notranslate">mustuse</span><tæ><vîi><li> <a href="dmd_nogc.html" title="dmd.nogc"><span class="d_inlinecode donthyphenate notranslate">nogc</span><tæ><vîi><li> <a href="dmd_nspace.html" title="dmd.nspace"><span class="d_inlinecode donthyphenate notranslate">nspace</span><tæ><vîi><li> <a href="dmd_ob.html" title="dmd.ob"><span class="d_inlinecode donthyphenate notranslate">ob</span><tæ><vîi><li> <a href="dmd_objc.html" title="dmd.objc"><span class="d_inlinecode donthyphenate notranslate">objc</span><tæ><vîi><li> <a href="dmd_objc_glue.html"�4itle="dmd.objc_glue"><span class="d_inlinecode donthyphenate notranslate">objc_glue<ztpan></a></li><li> �!�!a href="dmd_opover.html"�4itle="dmd.opover"><span class="d_inlinecode donthyphenate notranslate">opover<ztpan></a></li><li> �!�!a href="dmd_optimize.html"�4itle="dmd.optimize"><span class="d_inlinecode donthyphenate notranslate">optimize<ztpan></a></li><li> �!�!a href="dmd_parse.html" title="dmd.parse"><span class="d_inlinecode donthyphenate notranslate">parse</span><tæ><vîi><li> <a href="dmd_pragmasem.html"�4itle="dmd.pragmasem"><span class="d_inlinecode donthyphenate notranslate">pragmasem<ztpan></a></li><li> �!�!a href="dmd_printast.html"�4itle="dmd.printast"><span class="d_inlinecode donthyphenate notranslate">printast<ztpan></a></li><li> �!�!h7><span class="d_inlinecode donthyphenate notranslate">root</span><vv7><ul><li> <a href="dmd_root_aav.html" title="dmd.root.aav"><span class="d_inlinecode donthyphenate notranslate">aav<ztpan></a></li><li> �!�!a href="dmd_root_array.html"�4itle="dmd.root.array"><span class="d_inlinecode donthyphenate notranslate">array</span><tæ><vîi><li> <a href="dmd_root_bitarray.html"�4itle="dmd.root.bitarray"><span class="d_inlinecode donthyphenate notranslate">bitarray</span><tæ><vîi><li> <a href="dmd_root_complex.html" title="dmd.root.complex"><span class="d_inlinecode donthyphenate notranslate">complex<ztpan></a></li><li> �!�!a href="dmd_root_ctfloat.html"�4itle="dmd.root.ctfloat"><span class="d_inlinecode donthyphenate notranslate">ctfloat</span><tæ><vîi><li> <a href="dmd_root_env.html" title="dmd.root.env"><span class="d_inlinecode donthyphenate notranslate">env<ztpan></a></li><li> �!�!a href="dmd_root_file.html" title="dmd.root.file"><span class="d_inlinecode donthyphenate notranslate">file<ztpan></a></li><li> �!�!a href="dmd_root_filename.html" title="dmd.root.filename"><span class="d_inlinecode donthyphenate notranslate">filename<ztpan></a></li><li> �!�!a href="dmd_root_hash.html" title="dmd.root.hash"><span class="d_inlinecode donthyphenate notranslate">hash<ztpan></a></li><li> �!�!a href="dmd_root_longdouble.html" title="dmd.root.longdouble"><span class="d_inlinecode donthyphenate notranslate">longdouble<ztpan></a></li><li> �!�!a href="dmd_root_man.html"�4itle="dmd.root.man"><span class="d_inlinecode donthyphenate notranslate">man</span><tæ><vîi><li> <a href="dmd_root_optional.html"�4itle="dmd.root.optional"><span class="d_inlinecode donthyphenate notranslate">optional</span><tæ><vîi><li> <a href="dmd_root_port.html"�4itle="dmd.root.port"><span class="d_inlinecode donthyphenate notranslate">port</span><tæ><vîi><li> <a href="dmd_root_region.html"�4itle="dmd.root.region"><span class="d_inlinecode donthyphenate notranslate">region</span><tæ><vîi><li> <a href="dmd_root_response.html"�4itle="dmd.root.response"><span class="d_inlinecode donthyphenate notranslate">response</span><tæ><vîi><li> <a href="dmd_root_rmem.html"�4itle="dmd.root.rmem"><span class="d_inlinecode donthyphenate notranslate">rmem</span><tæ><vîi><li> <a href="dmd_root_speller.html" title="dmd.root.speller"><span class="d_inlinecode donthyphenate notranslate">speller<ztpan></a></li><li> �!�!a href="dmd_root_string.html" title="dmd.root.string"><span class="d_inlinecode donthyphenate notranslate">string<ztpan></a></li><li> �!�!a href="dmd_root_stringtable.html"�4itle="dmd.root.stringtable"><span class="d_inlinecode donthyphenate notranslate">stringtable</span><tæ><vîi><li> <a href="dmd_root_strtold.html" title="dmd.root.strtold"><span class="d_inlinecode donthyphenate notranslate">strtold<ztpan></a></li><li> �!�!a href="dmd_root_utf.html"�4itle="dmd.root.utf"><span class="d_inlinecode donthyphenate notranslate">utf</span><tæ> </li><zùl></li><li> �!�!a href="dmd_rootobject.html"�4itle="dmd.rootobject"><span class="d_inlinecode donthyphenate notranslate">rootobject<ztpan></a></li><li> �!�!a href="dmd_s2ir.html"�4itle="dmd.s2ir"><span class="d_inlinecode donthyphenate notranslate">sr<ztpan></a></li><li> �!�!a href="dmd_safe.html"�4itle="dmd.safe"><span class="d_inlinecode donthyphenate notranslate">safe<ztpan></a></li><li> �!�!a href="dmd_sarif.html" title="dmd.sarif"><span class="d_inlinecode donthyphenate notranslate">sarif</span><tæ><vîi><li> <a href="dmd_semantic2.html"�4itle="dmd.semantic�(N �)><span class="d_inlinecode donthyphenate notranslate">semantic�(vã�)ztpan></a></li><li> �!�!a href="dmd_semantic0Ô0¢0¹0È0ëhtml" title="dmd.semantic3"><span class="d_inlinecode donthyphenate notranslate">semantic3</span><tæ><vîi><li> <a href="dmd_sideeffect.html" title="dmd.sideeffect"><span class="d_inlinecode donthyphenate notranslate">sideeffect</span><tæ><vîi><li> <a href="dmd_statement.html"�4itle="dmd.statement"><span class="d_inlinecode donthyphenate notranslate">statement<ztpan></a></li><li> �!�!a href="dmd_statementsem.html"�4itle="dmd.statementsem"><span class="d_inlinecode donthyphenate notranslate">statementsem<ztpan></a></li><li> �!�!a href="dmd_staticassert.html"�4itle="dmd.staticassert"><span class="d_inlinecode donthyphenate notranslate">staticassert<ztpan></a></li><li> �!�!a href="dmd_staticcond.html"�4itle="dmd.staticcond"><span class="d_inlinecode donthyphenate notranslate">staticcond<ztpan></a></li><li> �!�!a href="dmd_stmtstate.html" title="dmd.stmtstate"><span class="d_inlinecode donthyphenate notranslate">stmtstate</span><tæ><vîi><li> <a href="dmd_target.html" title="dmd.target"><span class="d_inlinecode donthyphenate notranslate">target</span><tæ><vîi><li> <a href="dmd_templateparamsem.html" title="dmd.templateparamsem"><span class="d_inlinecode donthyphenate notranslate">templateparamsem</span><tæ><vîi><li> <a href="dmd_templatesem.html"�4itle="dmd.templatesem"><span class="d_inlinecode donthyphenate notranslate">templatesem<ztpan></a></li><li> �!�!a href="dmd_timetrace.html" title="dmd.timetrace"><span class="d_inlinecode donthyphenate notranslate">timetrace</span><tæ><vîi><li> <a href="dmd_tocsym.html" title="dmd.tocsym"><span class="d_inlinecode donthyphenate notranslate">tocsym</span><tæ><vîi><li> <a href="dmd_toctype.html"�4itle="dmd.toctype"><span class="d_inlinecode donthyphenate notranslate">toctype<ztpan></a></li><li> �!�!a href="dmd_tocvdebug.html" title="dmd.tocvdebug"><span class="d_inlinecode donthyphenate notranslate">tocvdebug</span><tæ><vîi><li> <a href="dmd_todt.html" title="dmd.todt"><span class="d_inlinecode donthyphenate notranslate">todt</span><tæ><vîi><li> <a href="dmd_toir.html" title="dmd.toir"><span class="d_inlinecode donthyphenate notranslate">toir</span><tæ><vîi><li> <a href="dmd_tokens.html" title="dmd.tokens"><span class="d_inlinecode donthyphenate notranslate">tokens</span><tæ><vîi><li> <a href="dmd_toobj.html"�4itle="dmd.toobj"><span class="d_inlinecode donthyphenate notranslate">toobj<ztpan></a></li><li> �!�!a href="dmd_traits.html"�4itle="dmd.traits"><span class="d_inlinecode donthyphenate notranslate">traits<ztpan></a></li><li> �!�!a href="dmd_typesem.html" title="dmd.typesem"><span class="d_inlinecode donthyphenate notranslate">typesem</span><tæ><vîi><li> <a href="dmd_typinf.html" title="dmd.typinf"><span class="d_inlinecode donthyphenate notranslate">typinf</span><tæ><vîi><li> <a href="dmd_utils.html"�4itle="dmd.utils"><span class="d_inlinecode donthyphenate notranslate">utils<ztpan></a></li><li> �!�!a href="dmd_visitor.html" title="dmd.visitor"><span class="d_inlinecode donthyphenate notranslate">visitor</span><tæ><ul><li> �!�!a href="dmd_visitor_foreachvar.html"�4itle="dmd.visitor.foreachvar"><span class="d_inlinecode donthyphenate notranslate">foreachvar<ztpan></a></li><li> �!�!a href="dmd_visitor_parsetime.html" title="dmd.visitor.parsetime"><span class="d_inlinecode donthyphenate notranslate">parsetime</span><tæ><vîi><li> <a href="dmd_visitor_permissive.html" title="dmd.visitor.permissive"><span class="d_inlinecode donthyphenate notranslate">permissive</span><tæ><vîi><li> <a href="dmd_visitor_postorder.html"�4itle="dmd.visitor.postorder"><span class="d_inlinecode donthyphenate notranslate">postorder<ztpan></a></li><li> �!�!a href="dmd_visitor_statement_rewrite_walker.html"�4itle="dmd.visitor.statement_rewrite_walker"><span class="d_inlinecode donthyphenate notranslate">statement_rewrite_walker<ztpan></a></li><li> �!�!a href="dmd_visitor_strict.html"�4itle="dmd.visitor.strict"><span class="d_inlinecode donthyphenate notranslate">strict<ztpan></a></li><li> �!�!a href="dmd_visitor_transitive.html"�4itle="dmd.visitor.transitive"><span class="d_inlinecode donthyphenate notranslate">transitive<ztpan></a> �!�!vîi></ul><vîi><li> <a href="dmd_vsoptions.html"�4itle="dmd.vsoptions"><span class="d_inlinecode donthyphenate notranslate">vsoptions<ztpan></a> <vîi></ul> </li> <li class='expand-container modlist-submenu-rt'><a class='expand-toggle' href='#'><span><em class="tt">rt</em><ztpan></a> <ul><li> �!�!a href="rt_aApply.html" title="rt.aApply"><span class="d_inlinecode donthyphenate notranslate">aApply<ztpan></a></li><li> �!�!a href="rt_aApplyR.html"�4itle="rt.aApplyR"><span class="d_inlinecode donthyphenate notranslate">aApplyR</span><tæ><vîi><li> <a href="rt_aaA.html" title="rt.aaA"><span class="d_inlinecode donthyphenate notranslate">aaA<ztpan></a></li><li> �!�!a href="rt_adi.html"�4itle="rt.adi"><span class="d_inlinecode donthyphenate notranslate">adi</span><tæ><vîi><li> <a href="rt_alloca.html"�4itle="rt.alloca"><span class="d_inlinecode donthyphenate notranslate">alloca</span><tæ><vîi><li> <a href="rt_arraycat.html"�4itle="rt.arraycat"><span class="d_inlinecode donthyphenate notranslate">arraycat</span><tæ><vîi><li> <a href="rt_cast_.html" title="rt.cast_"><span class="d_inlinecode donthyphenate notranslate">cast_<ztpan></a></li><li> �!�!a href="rt_cmath�(‘Ñ�)html" title="rt.cmath2"><span class="d_inlinecode donthyphenate notranslate">cmath�(vã�)ztpan></a></li><li> �!�!a href="rt_config.html" title="rt.config"><span class="d_inlinecode donthyphenate notranslate">config<ztpan></a></li><li> �!�!a href="rt_cover.html"�4itle="rt.cover"><span class="d_inlinecode donthyphenate notranslate">cover</span><tæ><vîi><li> <a href="rt_critical_.html" title="rt.critical_"><span class="d_inlinecode donthyphenate notranslate">critical_<ztpan></a></li><li> �!�!a href="rt_deh.html"�4itle="rt.deh"><span class="d_inlinecode donthyphenate notranslate">deh</span><tæ><vîi><li> <a href="rt_deh_win3�(‘Ñ�)html" title="rt.deh_win3�(N �)><span class="d_inlinecode donthyphenate notranslate">deh_win3�(vã�)ztpan></a></li><li> �!�!a href="rt_deh_win64_posix.html"�4itle="rt.deh_win64_posix"><span class="d_inlinecode donthyphenate notranslate">deh_win64_posix</span><tæ><vîi><li> <a href="rt_dmain2.html"�4itle="rt.dmain�(N �)><span class="d_inlinecode donthyphenate notranslate">dmain2</span><tæ><vîi><li> <a href="rt_dwarfeh.html" title="rt.dwarfeh"><span class="d_inlinecode donthyphenate notranslate">dwarfeh<ztpan></a></li><li> �!�!a href="rt_ehalloc.html"�4itle="rt.ehalloc"><span class="d_inlinecode donthyphenate notranslate">ehalloc</span><tæ><vîi><li> <a href="rt_invariant_.html"�4itle="rt.invariant_"><span class="d_inlinecode donthyphenate notranslate">invariant_</span><tæ><vîi><li> <a href="rt_lifetime.html"�4itle="rt.lifetime"><span class="d_inlinecode donthyphenate notranslate">lifetime</span><tæ><vîi><li> <a href="rt_llmath.html"�4itle="rt.llmath"><span class="d_inlinecode donthyphenate notranslate">llmath</span><tæ><vîi><li> <a href="rt_memory.html"�4itle="rt.memory"><span class="d_inlinecode donthyphenate notranslate">memory</span><tæ><vîi><li> <a href="rt_memset.html"�4itle="rt.memset"><span class="d_inlinecode donthyphenate notranslate">memset</span><tæ><vîi><li> <a href="rt_minfo.html" title="rt.minfo"><span class="d_inlinecode donthyphenate notranslate">minfo<ztpan></a></li><li> �!�!a href="rt_monitor_.html" title="rt.monitor_"><span class="d_inlinecode donthyphenate notranslate">monitor_<ztpan></a></li><li> �!�!a href="rt_msvc.html" title="rt.msvc"><span class="d_inlinecode donthyphenate notranslate">msvc<ztpan></a></li><li> �!�!a href="rt_msvc_math.html"�4itle="rt.msvc_math"><span class="d_inlinecode donthyphenate notranslate">msvc_math</span><tæ><vîi><li> <a href="rt_profilegc.html" title="rt.profilegc"><span class="d_inlinecode donthyphenate notranslate">profilegc<ztpan></a></li><li> �!�!a href="rt_sections.html" title="rt.sections"><span class="d_inlinecode donthyphenate notranslate">sections<ztpan></a></li><li> �!�!a href="rt_sections_darwin_64.html" title="rt.sections_darwin_64"><span class="d_inlinecode donthyphenate notranslate">sections_darwin_64<ztpan></a></li><li> �!�!a href="rt_sections_elf_shared.html"�4itle="rt.sections_elf_shared"><span class="d_inlinecode donthyphenate notranslate">sections_elf_shared</span><tæ><vîi><li> <a href="rt_sections_osx_x86.html"�4itle="rt.sections_osx_x86"><span class="d_inlinecode donthyphenate notranslate">sections_osx_x86</span><tæ><vîi><li> <a href="rt_sections_osx_x86_64.html" title="rt.sections_osx_x86_64"><span class="d_inlinecode donthyphenate notranslate">sections_osx_x86_64<ztpan></a></li><li> �!�!a href="rt_sections_solaris.html" title="rt.sections_solaris"><span class="d_inlinecode donthyphenate notranslate">sections_solaris<ztpan></a></li><li> �!�!a href="rt_sections_win64.html" title="rt.sections_win64"><span class="d_inlinecode donthyphenate notranslate">sections_win64<ztpan></a></li><li> �!�!a href="rt_tlsgc.html"�4itle="rt.tlsgc"><span class="d_inlinecode donthyphenate notranslate">tlsgc</span><tæ><vîi><li> <a href="rt_trace.html" title="rt.trace"><span class="d_inlinecode donthyphenate notranslate">trace<ztpan></a></li><li> �!�!a href="rt_tracegc.html"�4itle="rt.tracegc"><span class="d_inlinecode donthyphenate notranslate">tracegc</span><tæ><vîi><li> <h7><span class="d_inlinecode donthyphenate notranslate">util<ztpan></h7><ul><li> �!�!a href="rt_util_typeinfo.html"�4itle="rt.util.typeinfo"><span class="d_inlinecode donthyphenate notranslate">typeinfo<ztpan></a></li><li> �!�!a href="rt_util_utility.html" title="rt.util.utility"><span class="d_inlinecode donthyphenate notranslate">utility</span><tæ> </li><zùl> <vîi></ul> </li><zùl> <u(iv> <div class="hyphenate" id="content"> <div id="tools"><div > <div class="tip smallprint"> <a href="https:/u’ithub.com/dlang/phobosv}ssues/new?title=%5Bstd.algorithm.searching%5D%�(eå�)&label=Severity:Enhancement">Report a bug<tæ> <div�  If you spot a�0roblem�7ith this�0age, click here to create a Bugzilla issue. </div> </div> <div class="tip smallprint"> <a href="https:/u’ithub.com/dlang/phobosu0dit/masterzttdtælgorithmztearching.d">Improve this�0age<tæ> <div�  Quickly fork, edit online, and submit a�0ull request for this�0age. Requires a signed-in�?�?itHub account. This works well for small changes. If you'd like�4o make larger changes you may want�4o consider�5sing a local clone. <u(iv> <u(iv> </div></div> �!�!h1><span class="d_title">std.algorithm.searching</span><vv´ �!�!div class="quickindex" id="quickindex"><u(iv> <div class="summary">This is a submodule of <a href="std_algorithm.html"><span class="d_inlinecode donthyphenate notranslate">std.algorithm<ztpan></a>. It contains generic searching algorithms. </div><div class="description"><script�4ype="text/javascript">inhibitQuickIndex = ±</script> <table class="book"><caption>Cheat Sheet</caption><tr><th scope="col">Function Name<zËh>�!�!th scope="col">Description</th><zËr> <tr><td class="donthyphenate nobr"><a href="#all"><span class="d_inlinecode donthyphenate notranslate">all<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">all�T�Ma > 0"([1, �(l4�) 2 2, 4])<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span> because all elements are�0ositive<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#any"><span class="d_inlinecode donthyphenate notranslate">any</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">any!"a�.�.�.gt; 0"([1, 2, -3, -4])</span> returns <span class="d_inlinecode donthyphenate notranslate">true<ztpan> because at least one element is�0ositive<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#balancedParens"><span class="d_inlinecode donthyphenate notranslate">balancedParens</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">balancedParens("((1 + 1)� 2)", '(', ')')<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span> because the string has balanced parentheses.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#boyerMooreFinder"><span class="d_inlinecode donthyphenate notranslate">boyerMooreFinder<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">find("hello�7orld"+"+ boyerMooreFinder("or"))</span> returns <span class="d_inlinecode donthyphenate notranslate">"orld"<ztpan> �5sing�4he�!�!a href="https:]åen.wikipedia.org|øiki/Boyer%E2%80%93Moore_string_search_algorithm"> Boyer-Moore algorithm</a>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#canFind"><span class="d_inlinecode donthyphenate notranslate">canFind</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">canFind("hello�7orld"+"+ "or")</span> returns <span class="d_inlinecode donthyphenate notranslate">true<ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#count"><span class="d_inlinecode donthyphenate notranslate">count</span><tæ><zËd>�!�!td> Counts all elements or elements matching a predicate, specific element or sub-range.<br> <span class="d_inlinecode donthyphenate notranslate">count([1, 2, o)<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">0Ù0ü0¿ztpan>, <span class="d_inlinecode donthyphenate notranslate">count([1, 2, o, 1)</span> returns <span class="d_inlinecode donthyphenate notranslate">2</span> and <span class="d_inlinecode donthyphenate notranslate">count�T�Ma < 0"([1, -3, 0])<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">²ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#countUntil"><span class="d_inlinecode donthyphenate notranslate">countUntil</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">countUntil(a, b)</span> returns the number of steps taken in�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan>�4o reach <span class="d_inlinecode donthyphenate notranslate">b</span>; for example, <span class="d_inlinecode donthyphenate notranslate">countUntil("hello�T�M, "o")</span> returns <span class="d_inlinecode donthyphenate notranslate">4</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#commonPrefix"><span class="d_inlinecode donthyphenate notranslate">commonPrefix<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">commonPrefix("parakeet", "parachute")</span> returns <span class="d_inlinecode donthyphenate notranslate">"para"<ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#endsWith"><span class="d_inlinecode donthyphenate notranslate">endsWith</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">endsWith("rocks", "ks")<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#extrema"><span class="d_inlinecode donthyphenate notranslate">extrema<ztpan></a></td> <td><span class="d_inlinecode donthyphenate notranslate">extrema([�(l4�) 1, 0Ñ0ü0Ä 5, 4])<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">[1, 5]</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#find"><span class="d_inlinecode donthyphenate notranslate">find<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">find("hello�7orld"+"+ "or")</span> returns <span class="d_inlinecode donthyphenate notranslate">"orld"<ztpan>�5sing linear search. (For binary search refer�4o <a href="std_range.html#.SortedRange"><span class="d_inlinecode donthyphenate notranslate">std.range.SortedRange</span><tæ>.)<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#findAdjacent"><span class="d_inlinecode donthyphenate notranslate">findAdjacent</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">findAdjacent([1, 2, 0Ñ0ü0Ä 2 2, 4])<ztpan> returns�4he subrange starting�7ith two equal adjacent elements, i.e. <span class="d_inlinecode donthyphenate notranslate">[0Ñ0ü0Ä 2 2, 4]</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#findAmong"><span class="d_inlinecode donthyphenate notranslate">findAmong<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">findAmong("abcd"+"+ "qcx")<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">"cd"</span> because <span class="d_inlinecode donthyphenate notranslate">'c'</span> is among�!�!span class="d_inlinecode donthyphenate notranslate">"qcx"<ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#findSkip"><span class="d_inlinecode donthyphenate notranslate">findSkip</span><tæ><zËd>�!�!td> �!�?f <span class="d_inlinecode donthyphenate notranslate">a = "abcde"</span>,�4hen <span class="d_inlinecode donthyphenate notranslate">findSkip(a, "x")<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan> and leaves <span class="d_inlinecode donthyphenate notranslate">a</span> unchanged,�7hereas�!�!span class="d_inlinecode donthyphenate notranslate">findSkip(a, "c")</span> advances�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan> �4o <span class="d_inlinecode donthyphenate notranslate">"de"<ztpan> and returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#findSplit"><span class="d_inlinecode donthyphenate notranslate">findSplit<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">findSplit("abcdefg", "de")<ztpan> returns a�4uple of three ranges�!�!span class="d_inlinecode donthyphenate notranslate">"abc"<ztpan>, <span class="d_inlinecode donthyphenate notranslate">"de"<ztpan>, and <span class="d_inlinecode donthyphenate notranslate">"fg"<ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#findSplitAfter"><span class="d_inlinecode donthyphenate notranslate">findSplitAfter</span><tæ><zËd>�!�!td><span class="d_inlinecode donthyphenate notranslate">findSplitAfter("abcdefg", "de")<ztpan> returns a�4uple of two ranges�!�!span class="d_inlinecode donthyphenate notranslate">"abcde"<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">"fg"</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#findSplitBefore"><span class="d_inlinecode donthyphenate notranslate">findSplitBefore<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">findSplitBefore("abcdefg", "de")<ztpan> returns a�4uple of two ranges�!�!span class="d_inlinecode donthyphenate notranslate">"abc"<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">"defg"</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#minCount"><span class="d_inlinecode donthyphenate notranslate">minCount<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">minCount([2, 1, 1, 4, 1])</span> returns <span class="d_inlinecode donthyphenate notranslate">tuple(1, 0Î0Ã0È</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#maxCount"><span class="d_inlinecode donthyphenate notranslate">maxCount<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">maxCount([2, 4, 1, 4, 1])</span> returns <span class="d_inlinecode donthyphenate notranslate">tuple(4, �(SA�)</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#minElement"><span class="d_inlinecode donthyphenate notranslate">minElement<ztpan></a></td> <td> Selects the minimal element of a range. <span class="d_inlinecode donthyphenate notranslate">minElement([3, 4, 1, �3�3)<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">²ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#maxElement"><span class="d_inlinecode donthyphenate notranslate">maxElement</span><tæ><zËd>�!�!td> Selects�4he maximal element of a range. �!�!span class="d_inlinecode donthyphenate notranslate">maxElement([0Ñ0ü0Ä 2 2 2, 1, 2])</span> returns <span class="d_inlinecode donthyphenate notranslate">4</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#minIndex"><span class="d_inlinecode donthyphenate notranslate">minIndex<ztpan></a></td> <td> Index of�4he minimal element of a range. �!�!span class="d_inlinecode donthyphenate notranslate">minIndex([0Ñ0ü0Ä 2 2 2, 1, 2])</span> returns <span class="d_inlinecode donthyphenate notranslate">2</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#maxIndex"><span class="d_inlinecode donthyphenate notranslate">maxIndex<ztpan></a></td> <td> Index of�4he maximal element of a range. �!�!span class="d_inlinecode donthyphenate notranslate">maxIndex([0Ñ0ü0Ä 2 2 2, 1, 2])</span> returns <span class="d_inlinecode donthyphenate notranslate">1</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#minPos"><span class="d_inlinecode donthyphenate notranslate">minPos<ztpan></a></td> <td> <span class="d_inlinecode donthyphenate notranslate">minPos([2, 0Ñ0ü0Ä 1, 0Ñ0ü0Ä 2 2 2, o)<ztpan> returns�4he subrange <span class="d_inlinecode donthyphenate notranslate">[1, 2 2, 4, 1]<ztpan>, i.e., positions the range at�4he first occurrence of its minimal element.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#maxPos"><span class="d_inlinecode donthyphenate notranslate">maxPos</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">maxPos([�(l4�) 2 2, 1, 2 2, 4, 1])</span> returns the subrange�!�!span class="d_inlinecode donthyphenate notranslate">[4, o</span>, i.e.,�0ositions�4he range at the first occurrence of its maximal element.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#skipOver"><span class="d_inlinecode donthyphenate notranslate">skipOver<ztpan></a></td> <td> Assume�!�!span class="d_inlinecode donthyphenate notranslate">a = "blah"</span>. Then <span class="d_inlinecode donthyphenate notranslate">skipOver(a, "bi")</span> leaves�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan> �5nchanged and returns�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan>, whereas <span class="d_inlinecode donthyphenate notranslate">skipOver(a, "bl")</span> advances�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan>�4o refer to�!�!span class="d_inlinecode donthyphenate notranslate">"ah"</span> and returns <span class="d_inlinecode donthyphenate notranslate">true<ztpan>.<zËd></tr> <tr><td class="donthyphenate nobr"><a href="#startsWith"><span class="d_inlinecode donthyphenate notranslate">startsWith</span><tæ><zËd>�!�!td> �!�!span class="d_inlinecode donthyphenate notranslate">startsWith("hello,�7orld"+"+ "hello")<ztpan> returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span>.</td><zËr> <tr><td class="donthyphenate nobr"><a href="#until"><span class="d_inlinecode donthyphenate notranslate">until<ztpan></a></td> <td> Lazily iterates a range until a specific�6alue is found.</td><zËr> <zËable> <u(iv> <div class="keyval License"><span class="key keyLicense">License:<ztpan>�!�!div class="val�6alLicense"><a href="http:/uoost.orgkbICENSE_1_0.txt">Boost License 1.0<tæ>. </div></div> <div class="keyval Authors"><span class="key keyAuthors">Authors:</span> <div class="val valAuthors"><a href="http:]åerdani.com">Andrei Alexandrescu<tæ> <u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Source</span> <span class="phobos_src"><a class="https" href="https:]ågithub.comu(langy:hobos/blobwÛaster/std/algorithm/searching.d">stdtælgorithmztearching.d</a></span> <y:><u(iv> <dl><dt class="d_decl"><div� <span class="def-anchor" id=".all"><ztpan><div class="quickindex" id="quickindex.all"></div>template�!�!span class="def-anchor" id="all"><ztpan><code class="ddoc_psymbol">all</code>(alias pred = "a")<br><u(iv><u(t> <dd><div class="summary">Checks if <i>all</i> of the elements satisfy�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>.</div><span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">assert<ztpan>( <span class="d_psymbol">all<ztpan>Àspan class="d_string">"a�.�.�.amp; 1"<ztpan>([1, 2 2, 5, 5 5 5, 9])); <span class="d_keyword">assert</span>(Àspan class="d_psymbol">all</span>!<span class="d_string">"a & 1"</span>([1, �(l4�) 2 2, 5, 5 5 5, 9])); </pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="all"></span><code class="ddoc_psymbol">all<uode></span> can also be used�7ithout a�0redicate, if its items can be evaluated to�4rue or false in a conditional statement. This can be a convenient way to�iuickly evaluate that�!�!i>all<v}> of�4he elements of a range are�4rue. <pre class="d_code notranslate"><span class="d_keyword">int</span>[�5p¹�6als = [5, 0Ñ0ü0Ä 18]; <span class="d_keyword">assert</span>(�!�!span class="d_psymbol">all</span>(vals[])); </pre> <u(iv><u(iv> <dl><dt class="d_decl"><div� <span class="def-anchor" id=".all.all"><ztpan><div class="quickindex" id="quickindex.all.all"></div>bool�!�!span class="def-anchor" id="all"><ztpan><code class="ddoc_psymbol">all</code><span class="template_param_list"�4itle="Template�0arameter list">(Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isInputRange!Range && (__traits(isTemplate,�0red)�=| is(typeof(unaryFun�ired(<code class="ddoc_param">range</code>.front)))))</span>; <br><u(iv><u(t> <dd><div class="summary">Returns <span class="d_inlinecode donthyphenate notranslate">true<ztpan> if and only if the input range <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> is empty or <i>all</i>�6alues found in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> satisfy�4he�0redicate�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>. Performs (at most) <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">range.length<ztpan>)<ztpan> evaluations of <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>.<u(iv> </dd> </dl> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".any"></span><div class="quickindex" id="quickindex.any"><u(iv>template <span class="def-anchor" id="any"></span><code class="ddoc_psymbol">any<uode>(alias�0red = "a")<br></div></dt> <dd><div class="summary">Checks if�!�!i>any<v}> of�4he elements satisfies <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. <span class="d_inlinecode donthyphenate notranslate">!<span class="def-anchor" id="any"></span><code class="ddoc_psymbol">any<uode></span> can be�5sed to�6erify that�!�!i>none</i> of the elements satisfy <span class="d_inlinecode donthyphenate notranslate">pred</span>. This is sometimes called <span class="d_inlinecode donthyphenate notranslate">exists<ztpan> in other languages.</div><span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.ascii : isWhite; <span class="d_keyword">assert</span>( all�Z<span class="d_psymbol">any<ztpan>�XsWhite)([<span class="d_string">"a a"<ztpan>, <span class="d_string">"b b"</span>])); <span class="d_keyword">assert</span>(Àspan class="d_psymbol">any</span>!(all�XsWhite)([<span class="d_string">"a a"<ztpan>, <span class="d_string">"b b"</span>])); </pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="any"></span><code class="ddoc_psymbol">any<uode></span> can also be used�7ithout a�0redicate, if its items can be evaluated to�4rue or false in a conditional statement.�!�!span class="d_inlinecode donthyphenate notranslate">Àspan class="def-anchor" id="any"><ztpan><code class="ddoc_psymbol">any</code><ztpan> can be a convenient�7ay�4o quickly test�4hat <i>none<v}> of�4he elements of a range evaluate to�4rue. <pre class="d_code notranslate"><span class="d_keyword">int</span>[�5p¹�6als1 = [0, 0, 0]; <span class="d_keyword">assert</span>(Àspan class="d_psymbol">any</span>(valsm]));�!�!span class="d_comment">/wâone of�6als1 evaluate to�4rue </span> <span class="d_keyword">int<ztpan>[3] vals�(N��)= [2, 0, 2]; <span class="d_keyword">assert<ztpan>( <span class="d_psymbol">any<ztpan>(vals2[])); <span class="d_keyword">assert</span>(�I�Ill(vals2[])); <span class="d_keyword">int</span>[�5p¹�6als3 = [0Ñ0ü0Ä 2 2, �5p¹; <span class="d_keyword">assert</span>(�!�!span class="d_psymbol">any</span>(vals�3p¹])); <span class="d_keyword">assert<ztpan>( all(vals�3p¹])); <y:re> </div></div> <dl><dt class="d_decl"><div ><span class="def-anchor" id=".any.any"></span><div class="quickindex" id="quickindex.any.any"><u(iv>bool <span class="def-anchor" id="any"></span><code class="ddoc_psymbol">any<uode><span class="template_param_list" title="Template parameter list">(Range)<ztpan>(Range�!�!code class="ddoc_param">range<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0ange�.�.�.amp;& (__traits(isTemplate, pred) || is(typeof(unaryFun!pred(<code class="ddoc_param">range<uode>.front)))))<ztpan>; <br></div></dt> <dd><div class="summary">Returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span> if and only if�4he input range�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> is non-empty and <i>any</i>�6alue found in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> satisfies the predicate <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. Performs (at most)�!�!span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">range.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>.</div> <u(d> <u(l> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".balancedParens"></span><div class="quickindex" id="quickindex.balancedParens"></div>bool�!�!span class="def-anchor" id="balancedParens"></span><code class="ddoc_psymbol">balancedParens</code><span class="template_param_list"�4itle="Template�0arameter list">(Range, E)<ztpan>(Range�!�!code class="ddoc_param">r<uode>, E <code class="ddoc_param">lPar<uode>, E <code class="ddoc_param">rPar<uode>, size_t�!�!code class="ddoc_param">maxNestingLevel<uode> = size_t.max)<br><span class="constraint">if (isInputRange!Range && is(typeof(<code class="ddoc_param">r<uode>.front == <code class="ddoc_param">lPar<uode>)))<ztpan>; <br></div></dt> <dd><div class="summary">Checks whether <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r<uode></span> has "balanced parentheses", i.e. all instances of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">lPar</code><ztpan> are closed by corresponding instances of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">rPar</code><ztpan>. The parameter <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">maxNestingLevel<uode></span> controls�4he nesting level allowed. The most common uses are�4he default or <span class="d_inlinecode donthyphenate notranslate">0</span>.�!�?n the latter case, no nesting is allowed. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">Range <code class="ddoc_param">r</code><zËd> <td class="param_desc">The range to check.<zËd></tr> <tr class="param"><td class="param_id">E�!�!code class="ddoc_param">lPar</code><zËd> <td class="param_desc">The element corresponding with a left (opening) parenthesis.</td><zËr> <tr class="param"><td class="param_id">E <code class="ddoc_param">rPar<uode></td> <td class="param_desc">The element corresponding�7ith a right (closing) parenthesis.</td><zËr> <tr class="param"><td class="param_id">size_t�!�!code class="ddoc_param">maxNestingLevel<uode></td> <td class="param_desc">The maximum allowed nesting level.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">true if the given range has balanced�0arenthesis�7ithin the given maximum nesting level; false otherwise.<u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">auto<ztpan> s =�!�!span class="d_string">"1 + (�(N��)* (3 + 1� 2)"</span>; <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">balancedParens</span>(s, '(', ')')); s =�!�!span class="d_string">"1 + (�(N��)* (3 + 1) Xë�(SA�)"<ztpan>; <span class="d_keyword">assert</span>(<span class="d_psymbol">balancedParens</span>(s, '(', ')')); s =�!�!span class="d_string">"1 + (�(N��)* (3 + 1) Xë�(SA�)"<ztpan>; <span class="d_keyword">assert</span>(Àspan class="d_psymbol">balancedParens<ztpan>(s, '(', ')', 0)); s =�!�!span class="d_string">"1 + (�(N��)* 0µ0ó0Á0ü0à+ 1)� (�(N��)- 5)"<ztpan>; <span class="d_keyword">assert</span>(<span class="d_psymbol">balancedParens</span>(s, '(', ')', 0)); s = <span class="d_string">"f(x) = ⌈x⌉"<ztpan>; <span class="d_keyword">assert</span>(<span class="d_psymbol">balancedParens</span>(s, '⌈', '⌉')); <y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".BoyerMooreFinder"><ztpan><div class="quickindex" id="quickindex.BoyerMooreFinder"><u(iv>struct <span class="def-anchor" id="BoyerMooreFinder"><ztpan><code class="ddoc_psymbol">BoyerMooreFinder<uode>(alias�0red, Range); <br><br><span class="def-anchor" id=".boyerMooreFinder"><ztpan><div class="quickindex" id="quickindex.boyerMooreFinder"><u(iv>BoyerMooreFinder!(binaryFun�ired, Range) <span class="def-anchor" id="boyerMooreFinder"><ztpan><code class="ddoc_psymbol">boyerMooreFinder<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", Range)</span>(Range <code class="ddoc_param">needle<uode>)<br><span class="constraint">if (isRandomAccessRange!Range && hasSlicing!Range || isSomeString!Range)</span>; <br><u(iv><u(t> <dd><div class="summary">Sets�5p Boyer-Moore matching for�5se�7ith <span class="d_inlinecode donthyphenate notranslate">find<ztpan> below. By default, elements are compared for equality. <u(iv><div class="description"><span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="BoyerMooreFinder"></span><code class="ddoc_psymbol">BoyerMooreFinder</code><ztpan> allocates�?�?C memory. <u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">Predicate�5sed to compare elements.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">needle<uode></td> <td class="param_desc">A random-access range�7ith length and slicing.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">An instance of�!�!span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="BoyerMooreFinder"><ztpan><code class="ddoc_psymbol">BoyerMooreFinder<uode></span> that can be used�7ith <span class="d_inlinecode donthyphenate notranslate">find()<ztpan>�4o invoke the Boyer-Moore matching algorithm for finding of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan> in a given haystack.</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">auto</span> bmFinder =�!�!span class="d_psymbol">boyerMooreFinder<ztpan>(<span class="d_string">"TG"</span>); string r = <span class="d_string">"TAGTGCCTGA"<ztpan>; <span class="d_comment">]å search for the first match in�4he haystack r </span>r = bmFinder.beFound(r); writeln(r); <span class="d_comment">]å "TGCCTGA" <ztpan> <span class="d_comment">/Xëcontinue search in haystack </span>r = bmFinder.beFound(r[�(N��)..�.]); writeln(r); <span class="d_comment">]å "TGA" <ztpan></pre> <u(iv><u(iv> <dl><dt class="d_decl"><div� <span class="def-anchor" id=".BoyerMooreFinder.this"><ztpan><div class="quickindex" id="quickindex.BoyerMooreFinder.this"></div>this(Range�!�!code class="ddoc_param">needle</code>); <br></div></dt> <dd> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".BoyerMooreFinder.beFound"></span><div class="quickindex" id="quickindex.BoyerMooreFinder.beFound"></div>Range <span class="def-anchor" id="beFound"></span><code class="ddoc_psymbol">beFound<uode>(Range�!�!code class="ddoc_param">haystack</code>) scope; <br></div></dt> <dd> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".BoyerMooreFinder.length"><ztpan><div class="quickindex" id="quickindex.BoyerMooreFinder.length"></div>@property size_t�!�!span class="def-anchor" id="length"></span><code class="ddoc_psymbol">length</code>(); <br><u(iv><u(t> <dd> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".BoyerMooreFinder.opDollar"></span><div class="quickindex" id="quickindex.BoyerMooreFinder.opDollar"><u(iv>alias�!�!span class="def-anchor" id="opDollar"></span><code class="ddoc_psymbol">opDollar</code> = length; <br></div></dt> <dd> <u(d> <u(l> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".commonPrefix"></span><div class="quickindex" id="quickindex.commonPrefix"></div>auto�!�!span class="def-anchor" id="commonPrefix"></span><code class="ddoc_psymbol">commonPrefix</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ R1, R�(SA�)</span>(R1�!�!code class="ddoc_param">r1</code>, R�(N��)<code class="ddoc_param">r�(vã�)uode>)<br><span class="constraint">if (isForwardRange�1 D�1�01 && isInputRange!R2�.�.�.amp;& �XsNarrowString!R1�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">r1</code>.front,�!�!code class="ddoc_param">r2</code>.front))))<ztpan>; <br><br>auto�!�!span class="def-anchor" id="commonPrefix"></span><code class="ddoc_psymbol">commonPrefix</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred, R1, R2)<ztpan>(R1 <code class="ddoc_param">r²uode>, R2�!�!code class="ddoc_param">r2</code>)<br><span class="constraint">if (isNarrowString!R1�.�.�.amp;& isInputRange�1 D�1�0�(N��)&& is(typeof(binaryFun�ired(<code class="ddoc_param">r²uode>.front, <code class="ddoc_param">r�(vã�)uode>.front))))</span>; <br><br>auto <span class="def-anchor" id="commonPrefix"><ztpan><code class="ddoc_psymbol">commonPrefix<uode><span class="template_param_list" title="Template parameter list">(R1, R�(SA�)</span>(R1�!�!code class="ddoc_param">r1</code>, R�(N��)<code class="ddoc_param">r�(vã�)uode>)<br><span class="constraint">if (isNarrowString�1 D�1�01 && isInputRange!R2�.�.�.amp;& �XsNarrowString!R2�.�.�.amp;& is(typeof(<code class="ddoc_param">r²uode>.front == <code class="ddoc_param">r�(vã�)uode>.front)))<ztpan>; <br><br>auto�!�!span class="def-anchor" id="commonPrefix"></span><code class="ddoc_psymbol">commonPrefix</code><span class="template_param_list"�4itle="Template�0arameter list">(R1, R2)<ztpan>(R1 <code class="ddoc_param">r²uode>, R2�!�!code class="ddoc_param">r2</code>)<br><span class="constraint">if (isNarrowString!R1�.�.�.amp;& isNarrowString�1 D�1�0�(SA�)</span>; <br><u(iv><u(t> <dd><div class="summary">Returns the common�0refix of�4wo ranges. <u(iv><div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate to�5se in comparing elements for commonality. Defaults �4o equality�!�!span class="d_inlinecode donthyphenate notranslate">"a == b"</span>.</td><zËr> <tr class="param"><td class="param_id">R1�!�!code class="ddoc_param">r1</code><zËd> <td class="param_desc">A <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> of elements.</td><zËr> <tr class="param"><td class="param_id">R2�!�!code class="ddoc_param">r2</code><zËd> <td class="param_desc">An�!�!a href="std_range_primitives.html#.isInputRange">input range</a> of elements.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">A slice of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r²uode></span> which contains�4he characters that both ranges start�7ith, if the first argument is a string; otherwise,�4he same as�4he result of <span class="d_inlinecode donthyphenate notranslate">takeExactly(<code class="ddoc_param">r²uode>, n)</span>,�7here�!�!span class="d_inlinecode donthyphenate notranslate">n<ztpan> is the number of elements in the common prefix of both ranges. <u(iv><u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="std_range.html#.takeExactly"><span class="d_inlinecode donthyphenate notranslate">std.range.takeExactly</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate">writeln(<span class="d_psymbol">commonPrefix<ztpan>(<span class="d_string">"hello, world"</span>,�!�!span class="d_string">"hello, there"</span>));�!�!span class="d_comment">/Xë"hello, " </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".count"></span><div class="quickindex" id="quickindex.count"><u(iv>size_t <span class="def-anchor" id="count"></span><code class="ddoc_psymbol">count<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", Range, E)<ztpan>(Range�!�!code class="ddoc_param">haystack</code>, E�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>))))<ztpan>; <br><br>size_t�!�!span class="def-anchor" id="count"><ztpan><code class="ddoc_psymbol">count</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ R1, R�(SA�)</span>(R1�!�!code class="ddoc_param">haystack</code>, R�(N��)<code class="ddoc_param">needle<uode>)<br><span class="constraint">if (isForwardRange�1 D�1�01 && !isInfinite�1 D�1�01 && isForwardRange!R2�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>.front))))<ztpan>; <br></div></dt> <dd><div class="summary">Counts matches of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>. <u(iv><div class="description">The first overload counts each element�!�!span class="d_inlinecode donthyphenate notranslate">e<ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> for which�!�!span class="d_inlinecode donthyphenate notranslate">pred(e, <code class="ddoc_param">needle<uode>)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">true<ztpan>. <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> defaults to equality. Performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>. <div class="blankline"></div> The second overload counts�4he number of�4imes�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> was matched in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>.�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> compares elements in each range. Throws an exception if <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code>.empty<ztpan> is <span class="d_inlinecode donthyphenate notranslate">true<ztpan>, as�4he count of the empty range in any range�7ould be infinite. Overlapped counts are <em>not<u0m> considered, for example�!�!span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="count"></span><code class="ddoc_psymbol">count<uode>("aaa", "aa")<ztpan> is <span class="d_inlinecode donthyphenate notranslate">1</span>, not <span class="d_inlinecode donthyphenate notranslate">�(vã�)ztpan>. <u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Note</span> Regardless of the overload, <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="count"><ztpan><code class="ddoc_psymbol">count</code><ztpan>�7ill not accept infinite ranges for�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>. </p></div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate to compare elements.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">haystack<uode></td> <td class="param_desc">The range�4o count.</td><zËr> <tr class="param"><td class="param_id">E <code class="ddoc_param">needle<uode></td> <td class="param_desc">The element or sub-range to count in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">The number of matches in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>.</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_comment">]å count elements in range <ztpan><span class="d_keyword">int<ztpan>[] a = [ 1, �(l4�) 2 2 2, 0Ñ0ü0Ä 2, 5, 2 2, �(l4�) 2 2 2 ]; writeln(<span class="d_psymbol">count<ztpan>(a, �(SA�));�!�!span class="d_comment">/Xë0ª0ü0à</span>writeln(<span class="d_psymbol">count</span>!(<span class="d_string">"a�.�.�.gt; b"</span>)(a, �(SA�));�!�!span class="d_comment">/Xë5 </span><y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.uni : toLower; <span class="d_comment">/Xëcount range in range <ztpan>writeln(<span class="d_psymbol">count<ztpan>(<span class="d_string">"abcadfabf"<ztpan>, <span class="d_string">"ab"<ztpan>)); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">count<ztpan>(<span class="d_string">"ababab"</span>,�!�!span class="d_string">"abab"</span>));�!�!span class="d_comment">/Xë1 </span>writeln(<span class="d_psymbol">count</span>(<span class="d_string">"ababab"<ztpan>, <span class="d_string">"abx"</span>));�!�!span class="d_comment">/Xë0 </span><span class="d_comment">/Xëfuzzy count range in range <ztpan>writeln(<span class="d_psymbol">count<ztpan>�Z(a, b) =>�4oLower(a) ==�4oLower(b))(<span class="d_string">"AbcAdFaBf"<ztpan>, <span class="d_string">"ab"<ztpan>)); <span class="d_comment">]å 2 <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".count.�(N �)><ztpan><div class="quickindex" id="quickindex.count.2"></div>size_t�!�!span class="def-anchor" id="count"><ztpan><code class="ddoc_psymbol">count</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred, R)</span>(R <code class="ddoc_param">haystack<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& �XsInfinite!R && is(typeof(unaryFun!pred(<code class="ddoc_param">haystack</code>.front))))<ztpan>; <br><br>size_t�!�!span class="def-anchor" id="count"><ztpan><code class="ddoc_psymbol">count</code><span class="template_param_list"�4itle="Template�0arameter list">(R)</span>(R <code class="ddoc_param">haystack<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& �XsInfinite!R)</span>; <br><u(iv><u(t> <dd><div class="summary">Counts all elements or elements satisfying a�0redicate in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>. </div><div class="description">The first overload counts each element <span class="d_inlinecode donthyphenate notranslate">e</span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> for which <span class="d_inlinecode donthyphenate notranslate">pred(e)</span> is�!�!span class="d_inlinecode donthyphenate notranslate">true</span>. Performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>. <div class="blankline"></div> The second overload counts�4he number of elements in a range. If�4he given range has�4he�!�!span class="d_inlinecode donthyphenate notranslate">length</span> property, that is returned right away, otherwise performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length</span>)</span> to�7alk the range. </div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">Optional�0redicate�4o find elements.</td><zËr> <tr class="param"><td class="param_id">R <code class="ddoc_param">haystack<uode></td> <td class="param_desc">The range�4o count.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The number of elements in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> (for�7hich�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> returned�4rue).<u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_comment">/Xëcount elements in range </span><span class="d_keyword">int</span>[] a = [ 1, 2, 4, 2 2, �(l4�) 5, 0Ñ0ü0Ä 2, 4 ]; writeln(<span class="d_psymbol">count</span>(a));�!�!span class="d_comment">/Xë9 </span><span class="d_comment">/Xëcount predicate in range <ztpan>writeln(<span class="d_psymbol">count<ztpan>�Z<span class="d_string">"a > 2"<ztpan>)(a));�!�!span class="d_comment">/Xë5 </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".countUntil"><ztpan><div class="quickindex" id="quickindex.countUntil"><u(iv>auto <span class="def-anchor" id="countUntil"><ztpan><code class="ddoc_psymbol">countUntil<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R, Rs...)<ztpan>(R�!�!code class="ddoc_param">haystack</code>, Rs <code class="ddoc_param">needles</code>)<br><span class="constraint">if (isForwardRange!R && (Rs.length > 0) && (isForwardRange�ZRs[0]) == isInputRange�ZRs[0])) && allSatisfy!(canTestStartsWith�Zpred, R), Rs))</span>; <br><br>ptrdiff_t�!�!span class="def-anchor" id="countUntil"></span><code class="ddoc_psymbol">countUntil</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ R, N)</span>(R <code class="ddoc_param">haystack<uode>, N <code class="ddoc_param">needle<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>)) : bool))</span>; <br><br>ptrdiff_t�!�!span class="def-anchor" id="countUntil"></span><code class="ddoc_psymbol">countUntil</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred, R)</span>(R <code class="ddoc_param">haystack<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& is(typeof(unaryFun�ired(<code class="ddoc_param">haystack<uode>.front)) : bool))<ztpan>; <br></div></dt> <dd><div class="summary">Counts elements in the given <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> until the given predicate is�4rue for one of�4he given�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles</code><ztpan>. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The�0redicate for determining�7hen to stop counting.<zËd></tr> <tr class="param"><td class="param_id">R�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isInputRange">input range<tæ> to be counted.</td><zËr> <tr class="param"><td class="param_id">Rs�!�!code class="ddoc_param">needles<uode></td> <td class="param_desc">Either a single element, or a �!�!a href="std_range_primitives.html#.isForwardRange">forward range</a> of elements, to be evaluated in�4urn against each element in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>�5nder�4he given�0redicate.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">The number of elements�7hich must be�0opped from�4he front of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> before reaching an element for which <span class="d_inlinecode donthyphenate notranslate">startsWith!pred(<code class="ddoc_param">haystack</code>,�!�!code class="ddoc_param">needles<uode>)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">true<ztpan>. If �!�!span class="d_inlinecode donthyphenate notranslate">startsWith�ired(<code class="ddoc_param">haystack<uode>, <code class="ddoc_param">needles</code>)</span> is not�!�!span class="d_inlinecode donthyphenate notranslate">true</span> for any element in �!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>,�4hen <span class="d_inlinecode donthyphenate notranslate">-²ztpan> is returned. If more than one needle is�0rovided, �!�!span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="countUntil"><ztpan><code class="ddoc_psymbol">countUntil<uode></span> will�7rap the result in a tuple similar to �!�!span class="d_inlinecode donthyphenate notranslate">Tuple!(ptrdiff_t, "steps"+"+�0trdiff_t�!�!code class="ddoc_param">needle</code>)</span> <u(iv><u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="std_string.html#.indexOf"><span class="d_inlinecode donthyphenate notranslate">std.string.indexOf</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate">writeln(<span class="d_psymbol">countUntil<ztpan>(<span class="d_string">"hello�7orld"<ztpan>, <span class="d_string">"world"</span>));�!�!span class="d_comment">/Xë6 </span>writeln(<span class="d_psymbol">countUntil<ztpan>(<span class="d_string">"hello�7orld"<ztpan>, 'r'));�!�!span class="d_comment">/Xë8 </span>writeln(<span class="d_psymbol">countUntil<ztpan>(<span class="d_string">"hello�7orld"<ztpan>, <span class="d_string">"programming"</span>));�!�!span class="d_comment">/Xë-1 <ztpan>writeln(<span class="d_psymbol">countUntil</span>(<span class="d_string">"日本語"</span>,�!�!span class="d_string">"本語"</span>));�!�!span class="d_comment">/Xë1 </span>writeln(<span class="d_psymbol">countUntil<ztpan>(<span class="d_string">"日本語"<ztpan>, '語'));�!�!span class="d_comment">/Xë�(�)</span>writeln(<span class="d_psymbol">countUntil<ztpan>(<span class="d_string">"日本語"<ztpan>, <span class="d_string">"五"</span>));�!�!span class="d_comment">/Xë-1 <ztpan>writeln(<span class="d_psymbol">countUntil</span>(<span class="d_string">"日本語"</span>, '五')); <span class="d_comment">]å -1 </span>writeln(<span class="d_psymbol">countUntil<ztpan>([0, 5 5 5, , �(g �), 9], [1�(l4�) 2�3�3)); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">countUntil</span>([0, 7, 1�(l4�) 2�(l4�) 9], 9)); <span class="d_comment">]å 2 2 2 <ztpan>writeln(<span class="d_psymbol">countUntil</span>!<span class="d_string">"a > b"<ztpan>([0, 5 5 5, , �(g �), 9], �(eå�))); <span class="d_comment">]å 2 2 <ztpan> <span class="d_comment">/Xësupports multiple needles </span><span class="d_keyword">auto<ztpan> res =�!�!span class="d_string">"...hello"</span>.<span class="d_psymbol">countUntil</span>(<span class="d_string">"ha"<ztpan>, <span class="d_string">"he"<ztpan>); writeln(res.steps);�!�!span class="d_comment">/Xë0ª0ü0à</span>writeln(res.<span class="d_param">needle<ztpan>);�!�!span class="d_comment">/Xë1 </span> <span class="d_comment">]å returns -1 if no needle�7as found <ztpan>res = <span class="d_string">"hello"</span>.<span class="d_psymbol">countUntil</span>(<span class="d_string">"ha"<ztpan>, <span class="d_string">"hu"<ztpan>); writeln(res.steps);�!�!span class="d_comment">/Xë-1 <ztpan>writeln(res.<span class="d_param">needle</span>); <span class="d_comment">]å -1 </span><y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.ascii : isDigit; <span class="d_keyword">import<ztpan> std.uni : isWhite; writeln(<span class="d_psymbol">countUntil<ztpan>�ZisWhite)(<span class="d_string">"hello�7orld"<ztpan>)); <span class="d_comment">]å 5 <ztpan>writeln(<span class="d_psymbol">countUntil</span>!(isDigit)(<span class="d_string">"hello world"</span>));�!�!span class="d_comment">/Xë-1 <ztpan>writeln(<span class="d_psymbol">countUntil</span>!<span class="d_string">"a > 20"</span>([0, 7, 1�(l4�) 2�(l4�) 9]));�!�!span class="d_comment">/Xë0ª0ü0à</span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".endsWith"><ztpan><div class="quickindex" id="quickindex.endsWith"><u(iv>uint <span class="def-anchor" id="endsWith"><ztpan><code class="ddoc_psymbol">endsWith<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", Range, Needles...)</span>(Range <code class="ddoc_param">doesThisEnd</code>, Needles�!�!code class="ddoc_param">withOneOfThese</code>)<br><span class="constraint">if (isBidirectionalRange!Range && (Needles.length�.�.�.gt; 1)�.�.�.amp;& allSatisfy�ZcanTestStartsWith!(pred, Range), Needles))</span>; <br><br>bool <span class="def-anchor" id="endsWith"><ztpan><code class="ddoc_psymbol">endsWith<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">doesThisEnd</code>, R�(N��)<code class="ddoc_param">withThis<uode>)<br><span class="constraint">if (isBidirectionalRange�1 D�1�01 && isBidirectionalRange!R2�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">doesThisEnd<uode>.back,�!�!code class="ddoc_param">withThis</code>.back)) : bool))<ztpan>; <br><br>bool�!�!span class="def-anchor" id="endsWith"></span><code class="ddoc_psymbol">endsWith</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ R, E)</span>(R <code class="ddoc_param">doesThisEnd</code>, E�!�!code class="ddoc_param">withThis</code>)<br><span class="constraint">if (isBidirectionalRange!R && is(typeof(binaryFun�ired(<code class="ddoc_param">doesThisEnd</code>.back, <code class="ddoc_param">withThis<uode>)) : bool))<ztpan>; <br><br>bool�!�!span class="def-anchor" id="endsWith"></span><code class="ddoc_psymbol">endsWith</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred, R)</span>(R <code class="ddoc_param">doesThisEnd</code>)<br><span class="constraint">if (isInputRange!R && ifTestable!(typeof(<code class="ddoc_param">doesThisEnd</code>.front), unaryFun�ired))<ztpan>; <br></div></dt> <dd><div class="summary">Checks if�4he given range ends with (one of) the given needle(s). The reciprocal of�!�!span class="d_inlinecode donthyphenate notranslate">startsWith</span>. <u(iv><div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate to�5se for comparing elements between the range and the needle(s).</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">doesThisEnd</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isBidirectionalRange">bidirectional range<tæ> to check.<zËd></tr> <tr class="param"><td class="param_id">Needles�!�!code class="ddoc_param">withOneOfThese</code><zËd> <td class="param_desc">The needles to check against, which may be single elements, or bidirectional ranges of elements.</td><zËr> <tr class="param"><td class="param_id">R2�!�!code class="ddoc_param">withThis</code><zËd> <td class="param_desc">The single element�4o check.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">0 if the needle(s) do not occur at the end of�4he given range; otherwise the position of the matching needle,�4hat is, 1 if�4he range ends with�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">withOneOfThese<uode>[0]<ztpan>, �(N��)if it ends�7ith <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">withOneOfThese</code>[o</span>, and so on. <div class="blankline"><u(iv> In the case�7hen no needle parameters are given, return�!�!span class="d_inlinecode donthyphenate notranslate">true</span> iff back of <span class="d_inlinecode donthyphenate notranslate">doesThisStart</span> fulfils predicate <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>.<u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.ascii : isAlpha; <span class="d_keyword">assert</span>(<span class="d_string">"abc"</span>.<span class="d_psymbol">endsWith</span>!(a => a.isAlpha)); <span class="d_keyword">assert</span>(<span class="d_string">"abc"</span>.<span class="d_psymbol">endsWith</span>!isAlpha); <span class="d_keyword">assert<ztpan>(!<span class="d_string">"ab1"</span>.<span class="d_psymbol">endsWith</span>!(a => a.isAlpha)); <span class="d_keyword">assert<ztpan>(!<span class="d_string">"ab1"</span>.<span class="d_psymbol">endsWith</span>!isAlpha); <span class="d_keyword">assert</span>(Àspan class="d_string">""</span>.<span class="d_psymbol">endsWith</span>!(a => a.isAlpha)); <span class="d_keyword">import<ztpan> std.algorithm.comparison : among; <span class="d_keyword">assert<ztpan>(<span class="d_string">"abc"<ztpan>.<span class="d_psymbol">endsWith<ztpan>�Za => a.among('c', 'd') ³ 0)); <span class="d_keyword">assert</span>(Àspan class="d_string">"abc"<ztpan>.<span class="d_psymbol">endsWith<ztpan>�Za => a.among('a', 'b') ³ 0)); <span class="d_keyword">assert<ztpan>(<span class="d_psymbol">endsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">""<ztpan>)); <span class="d_keyword">assert</span>(Àspan class="d_psymbol">endsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"b"</span>)); writeln(<span class="d_psymbol">endsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"a"</span>, 'c')); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"c"<ztpan>, <span class="d_string">"a"</span>));�!�!span class="d_comment">/Xë1 </span>writeln(<span class="d_psymbol">endsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"c"</span>,�!�!span class="d_string">"c"<ztpan>)); <span class="d_comment">]å 1 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"bc"</span>,�!�!span class="d_string">"c"<ztpan>)); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"x"<ztpan>, <span class="d_string">"c"</span>,�!�!span class="d_string">"b"<ztpan>)); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"x"<ztpan>, <span class="d_string">"aa"<ztpan>, <span class="d_string">"bc"<ztpan>)); <span class="d_comment">]å 2 2 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"x"<ztpan>, <span class="d_string">"aaa"</span>,�!�!span class="d_string">"sab"<ztpan>)); <span class="d_comment">]å 0 <ztpan>writeln(<span class="d_psymbol">endsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"x"<ztpan>, <span class="d_string">"aaa"</span>, 'c', <span class="d_string">"sab"</span>));�!�!span class="d_comment">/Xë0ª0ü0à</span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".find"><ztpan><div class="quickindex" id="quickindex.find"><u(iv>InputRange <span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode><span class="template_param_list" title="Template parameter list">(alias�0red,�!�?nputRange)</span>(InputRange�!�!code class="ddoc_param">haystack</code>)<br><span class="constraint">if (isInputRange!InputRange)<ztpan>; <br></div></dt> <dd><div class="summary">Finds an element <span class="d_inlinecode donthyphenate notranslate">e</span> of an <a href="std_range_primitives.html#.isInputRange">input range<tæ> where <span class="d_inlinecode donthyphenate notranslate">pred(e)</span> is�!�!span class="d_inlinecode donthyphenate notranslate">true</span>. <p><div class="panel"><ul><li><span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode></span> behaves similarly to�!�!span class="d_inlinecode donthyphenate notranslate">dropWhile<ztpan> in other languages.</li> <li>To find the <em>last</em> matching element in a <a href="std_range_primitives.html#.isBidirectionalRange">bidirectional<tæ> <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>, call�!�!span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode>�ired(retro(<code class="ddoc_param">haystack<uode>))</span>. See�!�!a href="std_range.html#.retro"><span class="d_inlinecode donthyphenate notranslate">std.range.retro<ztpan></a>.<vîi> <zùl></div></p> <u(iv><div class="val"><p class="keyval Section"><span class="key keySection">Complexity<ztpan> <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode></span> performs�!�!span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">walkLength(haystack)</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>. </p></div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate to match an element.</td><zËr> <tr class="param"><td class="param_id">InputRange�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isInputRange">input range<tæ> searched in.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns"><span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> advanced such�4hat the front element satisfies <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. If no such element exists, returns an empty <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>.<u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">auto<ztpan> arr = [ 1, �(l4�) 2 2, 4, 1 ]; writeln(<span class="d_psymbol">find</span>!(<span class="d_string">"a�.�.�.gt; �(N �)</span>)(arr)); <span class="d_comment">]å [0Ñ0ü0Ä 2 2 2, o <ztpan> <span class="d_comment">/Xëwith�0redicate alias <ztpan><span class="d_keyword">bool</span> pred(<span class="d_keyword">int</span> e) => e + 1�.�.�.gt; 1.5; writeln(<span class="d_psymbol">find<ztpan>�Zpred)(arr));�!�!span class="d_comment">/Xëarr </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".find.�(N �)><ztpan><div class="quickindex" id="quickindex.find.�(N �)><u(iv>InputRange <span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", InputRange, Element)</span>(InputRange�!�!code class="ddoc_param">haystack</code>, scope Element�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isInputRange!InputRange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>)) : bool) && !is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>.front)) : bool))</span>; <br><br>R1 <span class="def-anchor" id="find"><ztpan><code class="ddoc_psymbol">find<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">haystack<uode>, scope R2�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& isForwardRange�1 D�1�0�(N��)&& is(typeof(binaryFun�ired(<code class="ddoc_param">haystack<uode>.front, <code class="ddoc_param">needle<uode>.front)) : bool))<ztpan>; <br></div></dt> <dd><div class="summary">Finds an individual element in an�!�!a href="std_range_primitives.html#.isInputRange">input range</a>. Elements of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> are compared with�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> by�5sing�0redicate <span class="d_inlinecode donthyphenate notranslate">pred</span> with�!�!span class="d_inlinecode donthyphenate notranslate">pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needle</code>)</span>. The�0redicate is passed�4o <a href="std_functional.html#.binaryFun"><span class="d_inlinecode donthyphenate notranslate">std.functional.binaryFun</span><tæ>, and can either accept a string, or any callable�4hat can be executed via <span class="d_inlinecode donthyphenate notranslate">pred(element, element)<ztpan>. </div><div class="description">If <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> is a <a href="std_range_primitives.html#.isForwardRange">forward range<tæ>, <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> can be a�!�!a href="std_range_primitives.html#.isForwardRange">forward range</a>�4oo. In�4his case�!�!span class="d_inlinecode donthyphenate notranslate">startsWith�ired(<code class="ddoc_param">haystack<uode>, <code class="ddoc_param">needle<uode>)<ztpan> is evaluated on each evaluation. <div class="blankline"><u(iv> <div class="note"><b>Note:<u> To find the first element <i>not</i> matching the needle, use predicate <span class="d_inlinecode donthyphenate notranslate">"a ³ b"<ztpan>.<u(iv> <u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Complexity</span> <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="find"></span><code class="ddoc_psymbol">find</code><ztpan>�0erforms <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">walkLength(haystack)<ztpan>)<ztpan> evaluations of <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. There are specializations that improve�0erformance by taking advantage of <a href="std_range_primitives.html#.isBidirectionalRange">bidirectional<tæ> or�!�!a href="std_range_primitives.html#.isRandomAccessRange">random access<tæ> ranges (where possible). </p></div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate for comparing each element�7ith the needle, defaulting�4o equality�!�!span class="d_inlinecode donthyphenate notranslate">"a == b"</span>.</td><zËr> <tr class="param"><td class="param_id">InputRange�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isInputRange">input range<tæ> searched in.<zËd></tr> <tr class="param"><td class="param_id">Element�!�!code class="ddoc_param">needle</code><zËd> <td class="param_desc">The element searched for.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns"><span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> advanced such�4hat the front element is�4he one searched for; �4hat is, until <span class="d_inlinecode donthyphenate notranslate">binaryFun�ired(<code class="ddoc_param">haystack<uode>.front, <code class="ddoc_param">needle<uode>)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">true<ztpan>. If no such�0osition exists, returns an empty�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>. </div></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#findAdjacent"><span class="d_inlinecode donthyphenate notranslate">findAdjacent</span><tæ>,�!�!a href="#findAmong"><span class="d_inlinecode donthyphenate notranslate">findAmong</span><tæ>,�!�!a href="#findSkip"><span class="d_inlinecode donthyphenate notranslate">findSkip</span><tæ>,�!�!a href="#findSplit"><span class="d_inlinecode donthyphenate notranslate">findSplit</span><tæ>,�!�!a href="#startsWith"><span class="d_inlinecode donthyphenate notranslate">startsWith</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.range.primitives; <span class="d_keyword">auto</span> arr = [1, �(l4�) 2 2 2, 4, 2 2 2, 4, 5, 6, 9]; writeln(arr.<span class="d_psymbol">find<ztpan>(4)); <span class="d_comment">]å [4, 2 2 2, 4, 2 2 2, 5, 5 5, 9] <ztpan>writeln(arr.<span class="d_psymbol">find</span>(1));�!�!span class="d_comment">/Xëarr </span>writeln(arr.<span class="d_psymbol">find<ztpan>(9)); <span class="d_comment">]å [9] <ztpan>writeln(arr.<span class="d_psymbol">find</span>!((e, n) => e > n)(4));�!�!span class="d_comment">/Xë[5, 6, 9] </span>writeln(arr.<span class="d_psymbol">find<ztpan>�Z(e, n) => e�.�.�.lt; n)(4)); <span class="d_comment">]å arr <ztpan><span class="d_keyword">assert</span>(arr.<span class="d_psymbol">find</span>(0).empty); <span class="d_keyword">assert<ztpan>(arr.<span class="d_psymbol">find<ztpan>(10).empty); <span class="d_keyword">assert<ztpan>(arr.<span class="d_psymbol">find<ztpan>(8).empty); writeln(<span class="d_psymbol">find<ztpan>(<span class="d_string">"hello, world"</span>, ',')); <span class="d_comment">]å ", world" <ztpan></pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples">Case-insensitive find of a string <pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.range.primitives; <span class="d_keyword">import<ztpan> std.uni :�4oLower; string[] s = [<span class="d_string">"Hello"<ztpan>, <span class="d_string">"world"</span>,�!�!span class="d_string">"!"<ztpan>]; writeln(s.<span class="d_psymbol">find<ztpan>�Z(e, n) =>�4oLower(e) == n)(<span class="d_string">"hello"</span>));�!�!span class="d_comment">/Xës </span><y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.container : SList; <span class="d_keyword">import<ztpan> std.range.primitives : empty; <span class="d_keyword">import<ztpan> std.typecons : Tuple; <span class="d_keyword">assert</span>(<span class="d_psymbol">find</span>(<span class="d_string">"hello,�7orld"<ztpan>, <span class="d_string">"World"</span>).empty); writeln(<span class="d_psymbol">find<ztpan>(<span class="d_string">"hello, world"</span>,�!�!span class="d_string">"wo"</span>));�!�!span class="d_comment">/Xë"world" </span>writeln([1, 2, 0Ñ0ü0Ä 2 2 2].<span class="d_psymbol">find</span>(SList!<span class="d_keyword">int<ztpan>(2, 0Î0Ã0È[])); <span class="d_comment">]å [�(l4�) 2 2, 4] <ztpan><span class="d_keyword">alias<ztpan> C = Tuple�Z<span class="d_keyword">int<ztpan>, <span class="d_string">"x"</span>,�!�!span class="d_keyword">int</span>,�!�!span class="d_string">"y"<ztpan>); <span class="d_keyword">auto<ztpan> a = [C(1,0), C(�(l4�)0), C(0Ñ0ü0Ä1), C(4,0)]; writeln(a.<span class="d_psymbol">find<ztpan>Àspan class="d_string">"a.x == b"</span>([2, �5p¹)); <span class="d_comment">]å [C(�(l4�) 0), C(3, 1), C(4, 0)] <ztpan>writeln(a[1 ..�.].<span class="d_psymbol">find</span>!<span class="d_string">"a.x == b"<ztpan>([�(l4�) 2 2]));�!�!span class="d_comment">/Xë[C(2, 0), C(0Ñ0ü0Ä 1), C(4, 0)] </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".find.0»0ó0Á><ztpan><div class="quickindex" id="quickindex.find.0»0ó0Á><u(iv>Tuple�ZRange, size_t)�!�!span class="def-anchor" id="find"></span><code class="ddoc_psymbol">find</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ Range, Needles...)<ztpan>(Range�!�!code class="ddoc_param">haystack</code>, Needles�!�!code class="ddoc_param">needles<uode>)<br><span class="constraint">if (Needles.length�.�.�.gt; 1 && is(typeof(startsWith!pred(<code class="ddoc_param">haystack</code>,�!�!code class="ddoc_param">needles<uode>))))</span>; <br><u(iv><u(t> <dd><div class="summary">Finds two or more <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles<uode></span> into a�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>. The�0redicate�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> is�5sed throughout�4o compare elements. By default, elements are compared for equality. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The�0redicate�4o use for comparing elements.<zËd></tr> <tr class="param"><td class="param_id">Range�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The target of the search. Must be an input range. If any of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles<uode></span> is a range�7ith elements comparable to elements in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>,�4hen <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> must be a <a href="std_range_primitives.html#.isForwardRange">forward range</a> such that�4he search can backtrack.</td><zËr> <tr class="param"><td class="param_id">Needles <code class="ddoc_param">needles</code><zËd> <td class="param_desc">One or more items to search for. Each of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles</code><ztpan> must be either comparable�4o one element in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>, or be itself a forward range with elements comparable�7ith elements in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>.<zËd></tr> </table></div></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">A tuple containing�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> positioned�4o match one of�4he needles and also the 1-based index of�4he matching element in�!�!span class="d_inlinecode donthyphenate notranslate">needles<ztpan> (0 if none of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles</code><ztpan> matched, 1 if�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles</code>[0]</span> matched, 2 if <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles<uode>[1]<ztpan> matched...). The first needle�4o be found will be�4he one�4hat matches.�!�?f multiple needles are found at the same spot in�4he range, then�4he shortest one is�4he one�7hich matches (if multiple needles of�4he same length are found at the same spot (e.g <span class="d_inlinecode donthyphenate notranslate">"a"<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">'a'<ztpan>),�4hen the left-most of�4hem in�4he argument list matches). <div class="blankline"></div> The relationship between�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> and <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles<uode></span> simply means that one can e.g. search for individual�!�!span class="d_inlinecode donthyphenate notranslate">int<ztpan>s or arrays of�!�!span class="d_inlinecode donthyphenate notranslate">int<ztpan>s in an array of�!�!span class="d_inlinecode donthyphenate notranslate">int<ztpan>s.�!�?n addition, if elements are individually comparable, searches of heterogeneous�4ypes are allowed as well: a <span class="d_inlinecode donthyphenate notranslate">double[]<ztpan> can be searched for an <span class="d_inlinecode donthyphenate notranslate">int</span> or a�!�!span class="d_inlinecode donthyphenate notranslate">short[]<ztpan>, and conversely a�!�!span class="d_inlinecode donthyphenate notranslate">long</span> can be searched for a <span class="d_inlinecode donthyphenate notranslate">float</span> or a�!�!span class="d_inlinecode donthyphenate notranslate">double[]</span>. This makes for efficient searches�7ithout�4he need to coerce one side of the comparison into the other's side�4ype. <div class="blankline"></div> The complexity of the search is <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length * max(needles.length)</span>)</span>. (For needles that are individual items, length is considered to be 1.) The strategy�5sed in searching several subranges at once maximizes cache�5sage by moving in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> as few times as�0ossible.</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.typecons :�4uple; <span class="d_keyword">int<ztpan>[] a = [ 1, 4, 2, 0µ0ó0Á0ü0à]; writeln(<span class="d_psymbol">find<ztpan>(a, 4));�!�!span class="d_comment">/Xë[4, �(l4�) 2 2] </span>writeln(<span class="d_psymbol">find<ztpan>(a, [1, 4])); <span class="d_comment">]å [1, 2 2 2, �(l4�) 2 2] </span>writeln(<span class="d_psymbol">find<ztpan>(a, [1, �5p¹, 4));�!�!span class="d_comment">/Xëtuple([4, �(l4�) 2 2], 2) </span><span class="d_comment">/XëMixed types allowed if comparable </span>writeln(<span class="d_psymbol">find<ztpan>(a, 5, [1.�(l4�) 2 2.5], 2.0)); <span class="d_comment">]å�4uple([�(l4�) 2 2], 2 2) </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".find.4"><ztpan><div class="quickindex" id="quickindex.find.4"><u(iv>RandomAccessRange�!�!span class="def-anchor" id="find"></span><code class="ddoc_psymbol">find</code><span class="template_param_list"�4itle="Template�0arameter list">(RandomAccessRange, alias�0red,�!�?nputRange)</span>(RandomAccessRange <code class="ddoc_param">haystack<uode>, scope BoyerMooreFinder�Zpred, InputRange) <code class="ddoc_param">needle<uode>); <br><u(iv><u(t> <dd><div class="summary">Finds <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> efficiently�5sing�4he <a href="https:/u0n.wikipedia.org/wikie‡oyer%E�(Qm�)80%90á0ü0È0ëoore_string_search_algorithm"> Boyer-Moore</a> method. <u(iv><div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">RandomAccessRange�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">A random-access range with length and slicing.</td><zËr> <tr class="param"><td class="param_id">BoyerMooreFinder�Zpred, InputRange) <code class="ddoc_param">needle<uode></td> <td class="param_desc">A�!�!a href="#BoyerMooreFinder"><span class="d_inlinecode donthyphenate notranslate">BoyerMooreFinder</span><tæ>.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns"><span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> advanced such that�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> is a�0refix of it (if no such�0osition exists, returns <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> advanced to�4ermination).</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.range.primitives : empty; <span class="d_keyword">int<ztpan>[] a = [ -1, 0, 1, 2, 0Ñ0ü0Ä 2 2 2, 5 ]; <span class="d_keyword">int</span>[] b = [ 1, 2, 0µ0ó0Á0ü0à]; writeln(<span class="d_psymbol">find</span>(a, boyerMooreFinder(b))); <span class="d_comment">]å [1, 2, 0Ñ0ü0Ä 2 2 2, 5] <ztpan><span class="d_keyword">assert</span>(<span class="d_psymbol">find</span>(b, boyerMooreFinder(a)).empty); </pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".canFind"><ztpan><div class="quickindex" id="quickindex.canFind"></div>template�!�!span class="def-anchor" id="canFind"><ztpan><code class="ddoc_psymbol">canFind</code>(alias pred = "a == b")<br></div></dt> <dd><div class="summary">Convenience function. Like find, but only returns�7hether or not the search was successful. <u(iv><div class="description">For more information about�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> see <a href="#find"><span class="d_inlinecode donthyphenate notranslate">find<ztpan></a>. <u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="std_algorithm_comparison.html#.among"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.among</span><tæ> for checking a�6alue against multiple arguments.</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">const<ztpan> arr = [0, 1, �(l4�) 2 2]; <span class="d_keyword">assert<ztpan>(<span class="d_psymbol">canFind</span>(arr, 2)); <span class="d_keyword">assert</span>(Àspan class="d_psymbol">canFind</span>(arr, 2 2 2)); <span class="d_comment">/Xëfind one of several needles </span><span class="d_keyword">assert<ztpan>(arr.<span class="d_psymbol">canFind</span>(0Ñ0ü0Ä 2)); <span class="d_keyword">assert</span>(arr.<span class="d_psymbol">canFind<ztpan>(3, �(SA�) == �(SA�); <span class="d_comment">]å second needle found <ztpan>writeln(arr.<span class="d_psymbol">canFind<ztpan>([1, 2 2], 2)); <span class="d_comment">]å 2 <ztpan> <span class="d_keyword">assert<ztpan>(<span class="d_psymbol">canFind</span>(arr, [1, 2], [�(l4�) 2 2])); writeln(<span class="d_psymbol">canFind</span>(arr, [1, 2], [�(l4�) 2 2]));�!�!span class="d_comment">/Xë1 </span><span class="d_keyword">assert<ztpan>(<span class="d_psymbol">canFind</span>(arr, [1, 5 5 5], [�(l4�) 2 2])); writeln(<span class="d_psymbol">canFind</span>(arr, [1, 5 5 5], [�(l4�) 2 2]));�!�!span class="d_comment">/Xë�(�)</span><span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">canFind<ztpan>(arr, [1, �5p¹, [2, 4])); writeln(<span class="d_psymbol">canFind<ztpan>(arr, [1, �5p¹, [2, 4])); <span class="d_comment">]å 0 <ztpan></pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples">Example�5sing a custom predicate. Note�4hat the needle appears as the second argument of�4he�0redicate. <pre class="d_code notranslate"><span class="d_keyword">auto</span> words = [ <span class="d_string">"apple"</span>, �!�!span class="d_string">"beeswax"<ztpan>, <span class="d_string">"cardboard"</span> ]; <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">canFind<ztpan>(words, <span class="d_string">"bees"<ztpan>)); <span class="d_keyword">assert</span>(�!�!span class="d_psymbol">canFind</span>!((string elem, string needle) => elem.startsWith(needle))(words, <span class="d_string">"bees"<ztpan>)); </pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples">Search for multiple items in an array of items (search for needles in an array of haystacks) <pre class="d_code notranslate">string s1 = <span class="d_string">"aaa1�aaa"</span>; string s2 =�!�!span class="d_string">"aaa�(g �)aa"<ztpan>; string s0µ0ó0Á0ü0à= <span class="d_string">"aaa30Õ0£0ü0Èaaa"</span>; string s4 =�!�!span class="d_string">"aaa444aaa"<ztpan>; <span class="d_keyword">const<ztpan> hay = [s1, s2, s3, s4]; <span class="d_keyword">assert<ztpan>(hay.<span class="d_psymbol">canFind</span>!(e => e.<span class="d_psymbol">canFind</span>(<span class="d_string">"�1"</span>,�!�!span class="d_string">"2�(g �)"<ztpan>))); <y:re> </div></div> <dl><dt class="d_decl"><div ><span class="def-anchor" id=".canFind.canFind"></span><div class="quickindex" id="quickindex.canFind.canFind"><u(iv>bool <span class="def-anchor" id="canFind"></span><code class="ddoc_psymbol">canFind<uode><span class="template_param_list" title="Template parameter list">(Range)<ztpan>(Range�!�!code class="ddoc_param">haystack</code>)<br><span class="constraint">if (is(typeof(find!pred(<code class="ddoc_param">haystack</code>))))<ztpan>; <br></div></dt> <dd><div class="summary">Returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span> if and only if�!�!span class="d_inlinecode donthyphenate notranslate">pred(e)<ztpan> is true for any�6alue�!�!span class="d_inlinecode donthyphenate notranslate">e<ztpan> in the input range <span class="d_inlinecode donthyphenate notranslate">range</span>. Performs (at most) <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>.</div> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".canFind.canFind.�(N �)><ztpan><div class="quickindex" id="quickindex.canFind.canFind.2"></div>bool�!�!span class="def-anchor" id="canFind"><ztpan><code class="ddoc_psymbol">canFind</code><span class="template_param_list"�4itle="Template�0arameter list">(Range, Element)<ztpan>(Range�!�!code class="ddoc_param">haystack</code>, scope Element�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (is(typeof(find!pred(<code class="ddoc_param">haystack</code>,�!�!code class="ddoc_param">needle</code>))))<ztpan>; <br></div></dt> <dd><div class="summary">Returns�!�!span class="d_inlinecode donthyphenate notranslate">true</span> if and only if�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> can be found in <span class="d_inlinecode donthyphenate notranslate"> range</span>. Performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">haystack.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>.</div> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".canFind.canFind.0»0ó0Á><ztpan><div class="quickindex" id="quickindex.canFind.canFind.3"></div>size_t�!�!span class="def-anchor" id="canFind"><ztpan><code class="ddoc_psymbol">canFind</code><span class="template_param_list"�4itle="Template�0arameter list">(Range, Needles...)</span>(Range <code class="ddoc_param">haystack<uode>, scope Needles <code class="ddoc_param">needles</code>)<br><span class="constraint">if (Needles.length > 1�.�.�.amp;& is(typeof(find�ired(<code class="ddoc_param">haystack<uode>, <code class="ddoc_param">needles</code>))))<ztpan>; <br></div></dt> <dd><div class="summary">Returns�4he 1-based index of the first needle found in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>. If no needle is found,�4hen <span class="d_inlinecode donthyphenate notranslate">0</span> is returned. <u(iv><div class="description">So, if�5sed directly in the condition of an <span class="d_inlinecode donthyphenate notranslate">if<ztpan> statement or loop, the result �7ill be�!�!span class="d_inlinecode donthyphenate notranslate">true</span> if one of the needles is found and�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan> if none are found, whereas if�4he result is�5sed elsewhere, it can either be cast�4o <span class="d_inlinecode donthyphenate notranslate">bool<ztpan> for�4he same effect or used�4o get which needle�7as found first �7ithout having to deal with�4he�4uple�4hat <a href="#find"><span class="d_inlinecode donthyphenate notranslate">find<ztpan></a> returns for�4he same operation.</div> </dd> </dl> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".findAdjacent"><ztpan><div class="quickindex" id="quickindex.findAdjacent"><u(iv>Range�!�!span class="def-anchor" id="findAdjacent"></span><code class="ddoc_psymbol">findAdjacent</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ Range)<ztpan>(Range�!�!code class="ddoc_param">r<uode>)<br><span class="constraint">if (isForwardRange�1 D�1�0ange)<ztpan>; <br></div></dt> <dd><div class="summary">Advances <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r<uode></span> until it finds�4he first�4wo adjacent elements�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan>, <span class="d_inlinecode donthyphenate notranslate">b</span> that satisfy�!�!span class="d_inlinecode donthyphenate notranslate">pred(a, b)</span>. Performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">r.length<ztpan>)<ztpan> evaluations of <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. </div><div class="description">For more information about <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> see�!�!a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ>. </div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The predicate to satisfy.<zËd></tr> <tr class="param"><td class="param_id">Range�!�!code class="ddoc_param">r<uode></td> <td class="param_desc">A�!�!a href="std_range_primitives.html#.isForwardRange">forward range</a>�4o search in.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns"><span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r</code><ztpan> advanced to�4he first occurrence of�4wo adjacent elements�4hat satisfy the given predicate.�!�?f there are no such two elements, returns <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r<uode></span> advanced until empty. <u(iv><u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="http:]åen.cppreference.com/w/cpp/algorithm/adjacent_find">STL's�!�!span class="d_inlinecode donthyphenate notranslate">adjacent_find<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">int<ztpan>[] a = [ 11, 10, 10, 9, 8, 8, 7, 8, 9 ]; <span class="d_keyword">auto<ztpan>�!�!span class="d_param">r</span> = <span class="d_psymbol">findAdjacent</span>(a); writeln(<span class="d_param">r<ztpan>);�!�!span class="d_comment">/Xë[10, 10, 9, 8, 8, 7, 8, 9] <ztpan><span class="d_keyword">auto</span> p = <span class="d_psymbol">findAdjacent</span>!(<span class="d_string">"a�.�.�.lt; b"</span>)(a); writeln(p);�!�!span class="d_comment">/Xë[7, 8, 9] </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".findAmong"></span><div class="quickindex" id="quickindex.findAmong"><u(iv>InputRange <span class="def-anchor" id="findAmong"></span><code class="ddoc_psymbol">findAmong<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", InputRange, ForwardRange)<ztpan>(InputRange <code class="ddoc_param">seq</code>, ForwardRange <code class="ddoc_param">choices</code>)<br><span class="constraint">if (isInputRange!InputRange�.�.�.amp;& isForwardRange�dorwardRange)</span>; <br><u(iv><u(t> <dd><div class="summary">Searches�4he given range for an element that matches one of the given choices. <u(iv><div class="description">Advances�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">seq</code><ztpan> by calling <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">seq<uode>.popFront<ztpan>�5ntil either <span class="d_inlinecode donthyphenate notranslate">find!(pred)(<code class="ddoc_param">choices<uode>, <code class="ddoc_param">seq</code>.front)</span> is�!�!span class="d_inlinecode donthyphenate notranslate">true</span>, or <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">seq<uode></span> becomes empty. Performs <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">seq.length * choices.length</span>)</span> evaluations of�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>. <div class="blankline"></div> For more information about�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> see <a href="#find"><span class="d_inlinecode donthyphenate notranslate">find<ztpan></a>. <u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The�0redicate�4o use for determining a match.</td><zËr> <tr class="param"><td class="param_id">InputRange�!�!code class="ddoc_param">seq<uode></td> <td class="param_desc">The�!�!a href="std_range_primitives.html#.isInputRange">input range</a>�4o search.<zËd></tr> <tr class="param"><td class="param_id">ForwardRange <code class="ddoc_param">choices</code><zËd> <td class="param_desc">A <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> of�0ossible choices.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns"><span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">seq</code><ztpan> advanced to�4he first matching element, or until empty if�4here are no matching elements. </div></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ>,�!�!a href="std_algorithm_comparison.html#.among"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.among<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">int<ztpan>[] a = [ -1, 0, 1, 2, 0Ñ0ü0Ä 2 2 2, 5 ]; <span class="d_keyword">int</span>[] b = [ 0Ñ0ü0Ä 1, �(N��)]; writeln(<span class="d_psymbol">findAmong</span>(a, b)); <span class="d_comment">]å a[2 .. $] </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".findSkip"><ztpan><div class="quickindex" id="quickindex.findSkip"><u(iv>bool <span class="def-anchor" id="findSkip"><ztpan><code class="ddoc_psymbol">findSkip<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(ref R1 <code class="ddoc_param">haystack<uode>, R2�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& isForwardRange�1 D�1�0�(N��)&& is(typeof(binaryFun�ired(<code class="ddoc_param">haystack<uode>.front, <code class="ddoc_param">needle<uode>.front))))</span>; <br><br>size_t <span class="def-anchor" id="findSkip"><ztpan><code class="ddoc_psymbol">findSkip<uode><span class="template_param_list" title="Template parameter list">(alias�0red, R1)</span>(ref R1�!�!code class="ddoc_param">haystack</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& ifTestable�Ztypeof(<code class="ddoc_param">haystack</code>.front), unaryFun�ired))<ztpan>; <br></div></dt> <dd><div class="summary">Finds�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> and positions <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> right after the first occurrence of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan>. </div><div class="description">If no needle is�0rovided,�4he�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> is advanced as long as�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> evaluates�4o <span class="d_inlinecode donthyphenate notranslate">true<ztpan>. Similarly, the haystack is positioned so as�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> evaluates to�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan> for <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code>.front<ztpan>. <div class="blankline"><u(iv> For more information about�!�!span class="d_inlinecode donthyphenate notranslate">pred</span> see <a href="#find"><span class="d_inlinecode donthyphenate notranslate">find<ztpan></a>. <u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">R1�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The �!�!a href="std_range_primitives.html#.isForwardRange">forward range</a>�4o search in.<zËd></tr> <tr class="param"><td class="param_id">R�(N��)<code class="ddoc_param">needle<uode></td> <td class="param_desc">The <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> to search for.<zËd></tr> <tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">Custom�0redicate for comparison of haystack and needle</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns"><span class="d_inlinecode donthyphenate notranslate">true</span> if�4he needle was found, in which case�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> is positioned after�4he end of the first occurrence of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan>; otherwise �!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan>, leaving <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>�5ntouched. If no needle is provided, it returns �4he number of�4imes�!�!span class="d_inlinecode donthyphenate notranslate">pred(<code class="ddoc_param">haystack</code>.front)</span> returned�4rue. </div></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.range.primitives : empty; <span class="d_comment">/XëNeedle is found; s is replaced by the substring following the first </span><span class="d_comment">/Xëoccurrence of the needle. </span>string s = <span class="d_string">"abcdef"<ztpan>; <span class="d_keyword">assert</span>(<span class="d_psymbol">findSkip</span>(s,�!�!span class="d_string">"cd"</span>)�.�.�.amp;& s ==�!�!span class="d_string">"ef"</span>); <span class="d_comment">/XëNeedle is not found; s is left�5ntouched. </span>s =�!�!span class="d_string">"abcdef"</span>; <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">findSkip</span>(s,�!�!span class="d_string">"cxd"<ztpan>) && s == <span class="d_string">"abcdef"<ztpan>); <span class="d_comment">]å�!�?f the needle occurs at�4he end of the range,�4he range is left empty. </span>s =�!�!span class="d_string">"abcdef"</span>; <span class="d_keyword">assert<ztpan>(<span class="d_psymbol">findSkip<ztpan>(s, <span class="d_string">"def"</span>)�.�.�.amp;& s.empty); </pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.ascii : isWhite; string s =�!�!span class="d_string">" abc"<ztpan>; <span class="d_keyword">assert</span>(<span class="d_psymbol">findSkip</span>!isWhite(s)�.�.�.amp;& s ==�!�!span class="d_string">"abc"<ztpan>); <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">findSkip</span>!isWhite(s)�.�.�.amp;& s ==�!�!span class="d_string">"abc"<ztpan>); s = <span class="d_string">" "<ztpan>; writeln(<span class="d_psymbol">findSkip</span>!isWhite(s));�!�!span class="d_comment">/Xë�(�)</span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".findSplit"></span><div class="quickindex" id="quickindex.findSplit"><u(iv>auto <span class="def-anchor" id="findSplit"></span><code class="ddoc_psymbol">findSplit<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">haystack<uode>, R2�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& isForwardRange�1 D�1�0�(SA�)</span>; <br><br><span class="def-anchor" id=".findSplitBefore"></span><div class="quickindex" id="quickindex.findSplitBefore"><u(iv>auto <span class="def-anchor" id="findSplitBefore"></span><code class="ddoc_psymbol">findSplitBefore<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">haystack<uode>, R2�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& isForwardRange�1 D�1�0�(SA�)</span>; <br><br><span class="def-anchor" id=".findSplitAfter"><ztpan><div class="quickindex" id="quickindex.findSplitAfter"><u(iv>auto <span class="def-anchor" id="findSplitAfter"><ztpan><code class="ddoc_psymbol">findSplitAfter<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">haystack<uode>, R2�!�!code class="ddoc_param">needle</code>)<br><span class="constraint">if (isForwardRange!R1�.�.�.amp;& isForwardRange�1 D�1�0�(SA�)</span>; <br><u(iv><u(t> <dd><div class="summary">These functions find�4he first occurrence of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> and then split�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> as follows. </div><div class="description"><div class="panel"><span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="findSplit"><ztpan><code class="ddoc_psymbol">findSplit</code><ztpan> returns a�4uple�!�!span class="d_inlinecode donthyphenate notranslate">result</span> containing�!�!i>three<v}> ranges. <ul><li><span class="d_inlinecode donthyphenate notranslate">result[0]</span> is�4he�0ortion of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> before <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan></li> <li><span class="d_inlinecode donthyphenate notranslate">result[o</span> is�4he�0ortion of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>�4hat matches <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan></li> <li><span class="d_inlinecode donthyphenate notranslate">result[�3�3</span> is�4he�0ortion of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> after�4he match.<vîi> <zùl> If <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan>�7as not found, <span class="d_inlinecode donthyphenate notranslate">result[0]</span> comprehends <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> entirely and <span class="d_inlinecode donthyphenate notranslate">result[o</span> and <span class="d_inlinecode donthyphenate notranslate">result[�3�3</span> are empty. <div class="blankline"></div> <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="findSplitBefore"><ztpan><code class="ddoc_psymbol">findSplitBefore</code><ztpan> returns a�4uple�!�!span class="d_inlinecode donthyphenate notranslate">result</span> containing�4wo ranges. <ul><li><span class="d_inlinecode donthyphenate notranslate">result[0]<ztpan> is the portion of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> before�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span><vîi> <li><span class="d_inlinecode donthyphenate notranslate">result[1]<ztpan> is the balance of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> starting�7ith the match.</li> </ul> If�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> was not found,�!�!span class="d_inlinecode donthyphenate notranslate">result[0]<ztpan> comprehends�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> entirely and�!�!span class="d_inlinecode donthyphenate notranslate">result[1]<ztpan> is empty. <div class="blankline"></div> <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="findSplitAfter"></span><code class="ddoc_psymbol">findSplitAfter</code><ztpan> returns a�4uple�!�!span class="d_inlinecode donthyphenate notranslate">result</span> containing�4wo ranges. <ul><li><span class="d_inlinecode donthyphenate notranslate">result[0]<ztpan> is the portion of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> up�4o and including the match<vîi> <li><span class="d_inlinecode donthyphenate notranslate">result[1]<ztpan> is the balance of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> starting after�4he match.<vîi> <zùl> If <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle</code><ztpan>�7as not found, <span class="d_inlinecode donthyphenate notranslate">result[0]</span> is empty and�!�!span class="d_inlinecode donthyphenate notranslate">result[1]<ztpan> is <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>. </div> <p>In all cases, the concatenation of�4he returned ranges spans�4he entire <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan>. <div class="blankline"><u(iv> If <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> is a random-access range, all�4hree components of�4he�4uple have the same�4ype as�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span>. Otherwise, <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> must be a <a href="std_range_primitives.html#.isForwardRange">forward range</a> and the�4ype of�!�!span class="d_inlinecode donthyphenate notranslate">result[0]<ztpan> (and <span class="d_inlinecode donthyphenate notranslate">result[o</span> for <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="findSplit"><ztpan><code class="ddoc_psymbol">findSplit</code><ztpan>) is�4he same as the result of�!�!a href="std_range.html#.takeExactly"><span class="d_inlinecode donthyphenate notranslate">std.range.takeExactly<ztpan></a>. <div class="blankline"><u(iv> For more information about <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> see�!�!a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ>. <y:> </div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">Predicate to compare 2 elements.</td><zËr> <tr class="param"><td class="param_id">R1�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The forward range to search.</td><zËr> <tr class="param"><td class="param_id">R2�!�!code class="ddoc_param">needle</code><zËd> <td class="param_desc">The forward range to look for.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">A sub-type of�!�!a href="std_typecons.html#.Tuple"><span class="d_inlinecode donthyphenate notranslate">std.typecons.Tuple<ztpan></a> of the split portions of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> (see above for details). This sub-type of�!�!span class="d_inlinecode donthyphenate notranslate">Tuple<ztpan> defines�!�!span class="d_inlinecode donthyphenate notranslate">opCast�I�I�Iool<ztpan>, which returns <span class="d_inlinecode donthyphenate notranslate">true<ztpan>�7hen the separating�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needle<uode></span> was found and <span class="d_inlinecode donthyphenate notranslate">false</span> otherwise. </div></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples">Returning a subtype of <a href="std_typecons.html#.Tuple"><span class="d_inlinecode donthyphenate notranslate">std.typecons.Tuple</span><tæ> enables the following convenient idiom: <pre class="d_code notranslate"><span class="d_comment">]å findSplit returns a�4riplet <ztpan><span class="d_keyword">if</span> (<span class="d_keyword">auto<ztpan> split =�!�!span class="d_string">"dlang-rocks"<ztpan>.<span class="d_psymbol">findSplit</span>(<span class="d_string">"-"</span>)) { writeln(split[0]);�!�!span class="d_comment">/Xë"dlang" </span> �7riteln(split[1]); <span class="d_comment">]å "-" <ztpan> writeln(split[�3�3);�!�!span class="d_comment">/Xë"rocks" </span>} <span class="d_keyword">else<ztpan>�!�!span class="d_keyword">assert<ztpan>(0); <span class="d_comment">]å findSplitBefore returns 2 ranges </span><span class="d_keyword">if<ztpan> (<span class="d_keyword">const<ztpan> split = [�(l4�) 2 2, �(l4�) 2 2, 4, 1].<span class="d_psymbol">findSplitBefore<ztpan>Àspan class="d_string">"a�.�.�.gt; b"</span>([2, �3�3)) { �7riteln(split[0]); <span class="d_comment">]å [�(l4�) 2 2, �3�3 <ztpan> <span class="d_comment">]å [0Ñ0ü0Ä 2 2 2] each greater�4han [2, �3�3 <ztpan> writeln(split[o);�!�!span class="d_comment">/Xë[3, 4, 1] </span>} <span class="d_keyword">else<ztpan>�!�!span class="d_keyword">assert<ztpan>(0); <y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.range.primitives : empty; <span class="d_keyword">auto<ztpan> a =�!�!span class="d_string">"Carl Sagan Memorial Station"<ztpan>; <span class="d_keyword">auto</span> r = <span class="d_psymbol">findSplit<ztpan>(a, <span class="d_string">"Velikovsky"<ztpan>); <span class="d_keyword">import<ztpan> std.typecons : isTuple; <span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(isTuple�Z<span class="d_keyword">typeof</span>(r.asTuple))); <span class="d_keyword">static</span> <span class="d_keyword">assert</span>(isTuple!(<span class="d_keyword">typeof<ztpan>(r))); <span class="d_keyword">assert<ztpan>(!r); writeln(r[0]);�!�!span class="d_comment">/Xëa </span><span class="d_keyword">assert<ztpan>(r[1].empty); <span class="d_keyword">assert</span>(r[�3�3.empty); r =�!�!span class="d_psymbol">findSplit</span>(a,�!�!span class="d_string">" "<ztpan>); writeln(r[0]); <span class="d_comment">]å "Carl" </span>writeln(r[1]); <span class="d_comment">]å " " <ztpan>writeln(r[�3�3);�!�!span class="d_comment">/Xë"Sagan Memorial Station" <ztpan><span class="d_keyword">if</span> (<span class="d_keyword">const</span> r1 =�!�!span class="d_psymbol">findSplitBefore</span>(a,�!�!span class="d_string">"Sagan"<ztpan>)) { �!�!span class="d_keyword">assert<ztpan>(r1); writeln(r1[0]); <span class="d_comment">]å "Carl " <ztpan> writeln(r1[1]); <span class="d_comment">]å "Sagan Memorial Station" </span>} <span class="d_keyword">if<ztpan> (<span class="d_keyword">const<ztpan> r�(N��)= <span class="d_psymbol">findSplitAfter</span>(a,�!�!span class="d_string">"Sagan"<ztpan>)) { �!�!span class="d_keyword">assert<ztpan>(r�(SA�); writeln(r2[0]); <span class="d_comment">]å "Carl Sagan" </span> �7riteln(r�3�1o);�!�!span class="d_comment">/Xë" Memorial Station" </span>} <y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples">Use <a href="std_range.html#.only"><span class="d_inlinecode donthyphenate notranslate">std.range.only</span><tæ> to find single elements: <pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.range : only; writeln([1, 2, 0Ñ0ü0Ä 2 2 2].<span class="d_psymbol">findSplitBefore<ztpan>(only(0Î0Ã0È)[0]);�!�!span class="d_comment">/Xë[1, �3�3 <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".minCount"></span><div class="quickindex" id="quickindex.minCount"></div>Tuple!(ElementType�1 D�1�0ange, size_t) <span class="def-anchor" id="minCount"><ztpan><code class="ddoc_psymbol">minCount<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a�.�.�.lt; b", Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">range<uode>.front, <code class="ddoc_param">range</code>.front))))<ztpan>; <br><br><span class="def-anchor" id=".maxCount"></span><div class="quickindex" id="quickindex.maxCount"></div>Tuple!(ElementType�1 D�1�0ange, size_t) <span class="def-anchor" id="maxCount"><ztpan><code class="ddoc_psymbol">maxCount<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a�.�.�.lt; b", Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">range<uode>.front, <code class="ddoc_param">range</code>.front))))<ztpan>; <br></div></dt> <dd><div class="summary">Computes the minimum (respectively maximum) of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> along with its number of occurrences. Formally, the minimum is a�6alue�!�!span class="d_inlinecode donthyphenate notranslate">x<ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> such�4hat <span class="d_inlinecode donthyphenate notranslate">pred(a,�8)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">false</span> for all values�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>. Conversely,�4he maximum is a value <span class="d_inlinecode donthyphenate notranslate">x</span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> such that�!�!span class="d_inlinecode donthyphenate notranslate">pred(x, a)</span> is�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan> for all�6alues <span class="d_inlinecode donthyphenate notranslate">a</span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> (note�4he swapped arguments�4o <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>). <u(iv><div class="description">These functions may be�5sed for computing arbitrary extrema by choosing <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> appropriately. For corrrect functioning, <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> must be a strict partial order, i.e. transitive (if�!�!span class="d_inlinecode donthyphenate notranslate">pred(a, b)�.�.�.amp;& pred(b, c)</span> then�!�!span class="d_inlinecode donthyphenate notranslate">pred(a, c)</span>) and irreflexive (<span class="d_inlinecode donthyphenate notranslate">pred(a, a)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">false</span>). The <a href="https:/u’oogle.com/search?btnI=I%�(y]�)m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=trichotomy�0roperty of inequality">trichotomy property of inequality</a> is not required: these algorithms consider elements�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">b<ztpan> equal (for the purpose of counting) if <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>�0uts them in the same equivalence class, i.e.�!�!span class="d_inlinecode donthyphenate notranslate">�ired(a, b) && !pred(b, a)</span>. </div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">The ordering�0redicate�4o use to determine�4he extremum (minimum or maximum).<zËd></tr> <tr class="param"><td class="param_id">Range�!�!code class="ddoc_param">range<uode></td> <td class="param_desc">The�!�!a href="std_range_primitives.html#.isInputRange">input range</a>�4o count.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The minimum, respectively maximum element of a range together�7ith the number it occurs in the range. </div></div> <div class="val"><p class="keyval Section"><span class="key keySection">Limitations</span> If at least one of�4he arguments is NaN,�4he result is an unspecified value. See�!�!a href="std_algorithm_searching.html#.maxElement"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.searching.maxElement<ztpan></a> for examples on how�4o cope�7ith NaNs. <y:><u(iv> <div class="keyval Throws"><span class="key keyThrows">Throws:</span> <div class="val valThrows"><span class="d_inlinecode donthyphenate notranslate">Exception<ztpan> if <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode>.empty</span>. </div></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="std_algorithm_comparison.html#.min"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.min<ztpan></a>, <a href="#minIndex"><span class="d_inlinecode donthyphenate notranslate">minIndex<ztpan></a>, <a href="#minElement"><span class="d_inlinecode donthyphenate notranslate">minElement<ztpan></a>, <a href="#minPos"><span class="d_inlinecode donthyphenate notranslate">minPos<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.conv :�4ext; <span class="d_keyword">import<ztpan> std.typecons : tuple; <span class="d_keyword">int<ztpan>[] a = [ 2, 0Ñ0ü0Ä 2 2 2, 1, 2, 4, 1, 1, 2 ]; <span class="d_comment">]å Minimum is 1 and occurs 2 2�4imes <ztpan>writeln(a.<span class="d_psymbol">minCount</span>); <span class="d_comment">]å�4uple(1, 0Î0Ã0È <ztpan><span class="d_comment">]å Maximum is 4 and occurs 2�4imes <ztpan>writeln(a.<span class="d_psymbol">maxCount</span>); <span class="d_comment">]å�4uple(4, �(SA�) <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".minElement"></span><div class="quickindex" id="quickindex.minElement"></div>auto�!�!span class="def-anchor" id="minElement"></span><code class="ddoc_psymbol">minElement</code><span class="template_param_list"�4itle="Template�0arameter list">(alias map = (a) => a, Range)<ztpan>(Range�!�!code class="ddoc_param">r<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0ange�.�.�.amp;& �XsInfinite!Range)</span>; <br><br>auto <span class="def-anchor" id="minElement"><ztpan><code class="ddoc_psymbol">minElement<uode><span class="template_param_list" title="Template parameter list">(alias map = (a) => a, Range, RangeElementType = ElementType!Range)</span>(Range <code class="ddoc_param">r</code>, RangeElementType <code class="ddoc_param">seed<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0ange�.�.�.amp;& �XsInfinite!Range && !is(CommonType!(ElementType�1 D�1�0ange, RangeElementType) ==�6oid))<ztpan>; <br></div></dt> <dd><div class="summary">Iterates the passed range and returns�4he minimal element. A custom mapping function can be�0assed to�!�!span class="d_inlinecode donthyphenate notranslate">map<ztpan>. In other languages�4his is sometimes called <span class="d_inlinecode donthyphenate notranslate">argmin<ztpan>. </div><div class="val"><p class="keyval Section"><span class="key keySection">Complexity</span> O(n) Exactly�!�!span class="d_inlinecode donthyphenate notranslate">n - ²ztpan> comparisons are needed. </p></div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">map</td> <td class="param_desc">custom accessor for�4he comparison key<zËd></tr> <tr class="param"><td class="param_id">Range�!�!code class="ddoc_param">r<uode></td> <td class="param_desc">range from which the minimal element will be selected</td><zËr> <tr class="param"><td class="param_id">RangeElementType�!�!code class="ddoc_param">seed</code><zËd> <td class="param_desc">custom seed to�5se as initial element<zËd></tr> </table></div></div> <div class="val"><p class="keyval Section"><span class="key keySection">Precondition<ztpan> If a seed is not given,�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r</code><ztpan> must not be empty. <y:><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The minimal element of the passed-in range. </div></div> <div class="val"><p class="keyval Section"><span class="key keySection">Note<ztpan> �!�?f at least one of the arguments is NaN, the result is an�5nspecified�6alue. <div class="blankline"><u(iv> �!�?f you want�4o ignore NaNs,�9ou can�5se�!�!a href="std_algorithm_iteration.html#.filter"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.iteration.filter<ztpan></a> and�!�!a href="std_math.html#.isNaN"><span class="d_inlinecode donthyphenate notranslate">std.math.isNaN<ztpan></a>�4o remove�4hem, before applying minElement. Add a suitable seed, to avoid error messages if all elements are NaNs: <div class="blankline"><u(iv> <pre class="d_code notranslate"><range>.filter!(a=>!a.isNaN).<span class="d_psymbol">minElement<ztpan>(<<span class="d_param">seed<ztpan>>); <y:re> <div class="blankline"><u(iv> �!�?f you want�4o get NaN as a result if a NaN is present in�4he range, you can use <a href="std_algorithm_iteration.html#.fold"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.iteration.fold</span><tæ> and <a href="std_math.html#.isNaN"><span class="d_inlinecode donthyphenate notranslate">std.math.isNaN</span><tæ>: <div class="blankline"></div> <pre class="d_code notranslate"><range>.fold�Z(a,b)=>a.isNaN || b.isNaN ?�!�!span class="d_keyword">real<ztpan>.nan : a�.�.�.lt; b ? a : b); </pre> </p></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#extrema"><span class="d_inlinecode donthyphenate notranslate">extrema</span><tæ>,�!�!a href="#maxElement"><span class="d_inlinecode donthyphenate notranslate">maxElement</span><tæ>,�!�!a href="std_algorithm_comparison.html#.min"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.min<ztpan></a>, <a href="#minCount"><span class="d_inlinecode donthyphenate notranslate">minCount<ztpan></a>, <a href="#minIndex"><span class="d_inlinecode donthyphenate notranslate">minIndex<ztpan></a>, <a href="#minPos"><span class="d_inlinecode donthyphenate notranslate">minPos<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.range : enumerate; <span class="d_keyword">import<ztpan> std.typecons : tuple; writeln([2, 7, 1, �5p¹.<span class="d_psymbol">minElement<ztpan>);�!�!span class="d_comment">/Xë1 </span> <span class="d_comment">]å allows to get�4he index of an element�4oo <ztpan>writeln([5, 0Ñ0ü0Ä 5 5 5, 9].enumerate.<span class="d_psymbol">minElement<ztpan>Àspan class="d_string">"a.value"<ztpan>);�!�!span class="d_comment">/Xëtuple(1, 2 2) </span> <span class="d_comment">]å any custom accessor can be passed <ztpan>writeln([[0, 2 2 2], [1, 2]].<span class="d_psymbol">minElement<ztpan>Àspan class="d_string">"a[1]"</span>); <span class="d_comment">]å [1, 2] </span> <span class="d_comment">]å can be seeded <ztpan><span class="d_keyword">int<ztpan>[] arr; writeln(arr.<span class="d_psymbol">minElement</span>(1));�!�!span class="d_comment">/Xë1 </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".maxElement"><ztpan><div class="quickindex" id="quickindex.maxElement"><u(iv>auto <span class="def-anchor" id="maxElement"><ztpan><code class="ddoc_psymbol">maxElement<uode><span class="template_param_list" title="Template parameter list">(alias map = (a) => a, Range)</span>(Range <code class="ddoc_param">r</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange)<ztpan>; <br><br>auto�!�!span class="def-anchor" id="maxElement"></span><code class="ddoc_psymbol">maxElement</code><span class="template_param_list"�4itle="Template�0arameter list">(alias map = (a) => a, Range, RangeElementType = ElementType�1 D�1�0ange)<ztpan>(Range�!�!code class="ddoc_param">r<uode>, RangeElementType�!�!code class="ddoc_param">seed</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& �Xs(CommonType�ZElementType!Range, RangeElementType) == void))</span>; <br><u(iv><u(t> <dd><div class="summary">Iterates�4he�0assed range and returns the maximal element. A custom mapping function can be passed�4o <span class="d_inlinecode donthyphenate notranslate">map</span>. In other languages this is sometimes called�!�!span class="d_inlinecode donthyphenate notranslate">argmax</span>. <u(iv><div class="val"><p class="keyval Section"><span class="key keySection">Complexity<ztpan> O(n) Exactly <span class="d_inlinecode donthyphenate notranslate">n - 1</span> comparisons are needed. <y:><u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">map<zËd> <td class="param_desc">custom accessor for the comparison key</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">r</code><zËd> <td class="param_desc">range from�7hich�4he maximum element�7ill be selected<zËd></tr> <tr class="param"><td class="param_id">RangeElementType <code class="ddoc_param">seed<uode></td> <td class="param_desc">custom seed�4o use as initial element</td><zËr> <zËable><u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Precondition</span> If a seed is not given, <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r<uode></span> must not be empty. </p></div> <div class="keyval Returns"><span class="key keyReturns">Returns:</span> <div class="val valReturns">The maximal element of�4he�0assed-in range. <u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Note</span> If at least one of�4he arguments is NaN,�4he result is an unspecified value. See�!�!a href="std_algorithm_searching.html#.minElement"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.searching.minElement<ztpan></a> for examples on how�4o cope �7ith NaNs. <y:><u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="#extrema"><span class="d_inlinecode donthyphenate notranslate">extrema<ztpan></a>, <a href="#minElement"><span class="d_inlinecode donthyphenate notranslate">minElement<ztpan></a>, <a href="std_algorithm_comparison.html#.max"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.max</span><tæ>,�!�!a href="#maxCount"><span class="d_inlinecode donthyphenate notranslate">maxCount</span><tæ>, �!�!a href="#maxIndex"><span class="d_inlinecode donthyphenate notranslate">maxIndex</span><tæ>,�!�!a href="#maxPos"><span class="d_inlinecode donthyphenate notranslate">maxPos</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.range : enumerate; <span class="d_keyword">import</span> std.typecons :�4uple; writeln([2, 1, 2 2 2, �5p¹.<span class="d_psymbol">maxElement<ztpan>);�!�!span class="d_comment">/Xë4 </span> <span class="d_comment">]å allows to get�4he index of an element�4oo <ztpan>writeln([2, 1, 2 2 2, �5p¹.enumerate.<span class="d_psymbol">maxElement<ztpan>Àspan class="d_string">"a.value"<ztpan>);�!�!span class="d_comment">/Xëtuple(�(l4�) 2 2 2) </span> <span class="d_comment">]å any custom accessor can be passed <ztpan>writeln([[0, 2 2 2], [1, 2]].<span class="d_psymbol">maxElement<ztpan>Àspan class="d_string">"a[1]"</span>); <span class="d_comment">]å [0, 2 2 2] </span> <span class="d_comment">]å can be seeded <ztpan><span class="d_keyword">int<ztpan>[] arr; writeln(arr.minElement(1)); <span class="d_comment">]å 1 <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".extrema"><ztpan><div class="quickindex" id="quickindex.extrema"></div>ElementType!Range[�3�3�!�!span class="def-anchor" id="extrema"><ztpan><code class="ddoc_psymbol">extrema</code><span class="template_param_list"�4itle="Template�0arameter list">(Range)</span>(Range <code class="ddoc_param">r</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange)<ztpan>; <br></div></dt> <dd><div class="summary">Returns an array of�4he minimum and maximum element in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r<uode></span>. Performs�!�!span class="d_inlinecode donthyphenate notranslate">< 2 2n/�(vã�)ztpan> comparisons, unlike�4he naive�!�!span class="d_inlinecode donthyphenate notranslate">< 2n<ztpan>. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">Range <code class="ddoc_param">r</code><zËd> <td class="param_desc">The range to�4raverse.</td><zËr> <zËable><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate">writeln(<span class="d_psymbol">extrema</span>([5, �(l4�) 9, 4, 1]));�!�!span class="d_comment">/Xë[1, 9] <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".minPos"></span><div class="quickindex" id="quickindex.minPos"></div>Range <span class="def-anchor" id="minPos"><ztpan><code class="ddoc_psymbol">minPos<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a�.�.�.lt; b", Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isForwardRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">range<uode>.front, <code class="ddoc_param">range</code>.front))))<ztpan>; <br><br><span class="def-anchor" id=".maxPos"></span><div class="quickindex" id="quickindex.maxPos"></div>Range <span class="def-anchor" id="maxPos"><ztpan><code class="ddoc_psymbol">maxPos<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a�.�.�.lt; b", Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isForwardRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">range<uode>.front, <code class="ddoc_param">range</code>.front))))<ztpan>; <br></div></dt> <dd><div class="summary">Computes a subrange of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> starting at the first occurrence of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>'s minimum (respectively maximum) and�7ith the same ending as�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan>, or�4he empty range if <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> itself is empty. <u(iv><div class="description">Formally, the minimum is a�6alue�!�!span class="d_inlinecode donthyphenate notranslate">x<ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> such�4hat <span class="d_inlinecode donthyphenate notranslate">pred(a,�8)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">false</span> for all values�!�!span class="d_inlinecode donthyphenate notranslate">a<ztpan> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>. Conversely,�4he maximum is a value <span class="d_inlinecode donthyphenate notranslate">x</span> in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> such that�!�!span class="d_inlinecode donthyphenate notranslate">pred(x, a)</span> is�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan> for all�6alues <span class="d_inlinecode donthyphenate notranslate">a</span> in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> (note the swapped arguments�4o <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>). <div class="blankline"></div> These functions may be�5sed for computing arbitrary extrema by choosing <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> appropriately. For corrrect functioning, <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> must be a strict partial order, i.e. transitive (if�!�!span class="d_inlinecode donthyphenate notranslate">pred(a, b)�.�.�.amp;& pred(b, c)</span> then�!�!span class="d_inlinecode donthyphenate notranslate">pred(a, c)</span>) and irreflexive (<span class="d_inlinecode donthyphenate notranslate">pred(a, a)<ztpan> is <span class="d_inlinecode donthyphenate notranslate">false</span>). <u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The ordering predicate to�5se�4o determine the extremum (minimum or maximum) element.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">range</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> to search.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The�0osition of�4he minimum (respectively maximum) element of forward range�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan>, i.e. a subrange of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan> starting at�4he�0osition of its smallest (respectively largest) element and with�4he same ending as <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>. </div></div> <div class="val"><p class="keyval Section"><span class="key keySection">Limitations</span> If at least one of�4he arguments is NaN,�4he result is an unspecified value. See�!�!a href="std_algorithm_searching.html#.maxElement"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.searching.maxElement<ztpan></a> for examples on how�4o cope�7ith NaNs. <y:><u(iv> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:</span> <div class="val valSeeAlso"><a href="std_algorithm_comparison.html#.max"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.max</span><tæ>,�!�!a href="#minCount"><span class="d_inlinecode donthyphenate notranslate">minCount</span><tæ>,�!�!a href="#minIndex"><span class="d_inlinecode donthyphenate notranslate">minIndex</span><tæ>,�!�!a href="#minElement"><span class="d_inlinecode donthyphenate notranslate">minElement</span><tæ><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">int</span>[] a = [ �(l4�) 2 2, 4, 1, �(l4�) 2 2 2, 1, 1, �(N��)]; <span class="d_comment">/XëMinimum is 1 and first occurs in�0osition 0ª0ü0à</span>writeln(a.<span class="d_psymbol">minPos<ztpan>);�!�!span class="d_comment">/Xë[1, �(l4�) 2 2 2, 1, 1, �3�3 <ztpan><span class="d_comment">]å Maximum is 4 and first occurs in position 2 <ztpan>writeln(a.<span class="d_psymbol">maxPos</span>); <span class="d_comment">]å [4, 1, �(l4�) 2 2 2, 1, 1, �3�3 <ztpan></pre> <u(iv><u(iv> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".minIndex"></span><div class="quickindex" id="quickindex.minIndex"></div>ptrdiff_t <span class="def-anchor" id="minIndex"><ztpan><code class="ddoc_psymbol">minIndex<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a�.�.�.lt; b", Range)</span>(Range <code class="ddoc_param">range</code>)<br><span class="constraint">if (isInputRange!Range && !isInfinite�1 D�1�0ange�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">range<uode>.front, <code class="ddoc_param">range</code>.front))))<ztpan>; <br></div></dt> <dd><div class="summary">Computes the index of�4he first occurrence of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan>'s minimum element. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The ordering predicate to�5se�4o determine the minimum element.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">range</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isInputRange">input range<tæ> to search.</td><zËr> <zËable><u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Complexity</span> <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">range.length<ztpan>)<ztpan> Exactly�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code>.length - 1</span> comparisons are needed. <y:><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The index of the first encounter of�4he minimum element in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>.�!�?f the <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> is empty, -1 is returned. <u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Limitations<ztpan> If at least one of the arguments is NaN, the result is an�5nspecified�6alue. See <a href="std_algorithm_searching.html#.maxElement"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.searching.maxElement</span><tæ> for examples on how to cope with NaNs. </p></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#maxIndex"><span class="d_inlinecode donthyphenate notranslate">maxIndex</span><tæ>,�!�!a href="std_algorithm_comparison.html#.min"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.min<ztpan></a>, <a href="#minCount"><span class="d_inlinecode donthyphenate notranslate">minCount<ztpan></a>, <a href="#minElement"><span class="d_inlinecode donthyphenate notranslate">minElement<ztpan></a>, <a href="#minPos"><span class="d_inlinecode donthyphenate notranslate">minPos<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">int<ztpan>[] a = [�(l4�) 2 2, 4, 1, �(l4�) 2 2 2, 1, 1, �3�3; <span class="d_comment">/XëMinimum is 1 and first occurs in�0osition 0ª0ü0à</span>writeln(a.<span class="d_psymbol">minIndex<ztpan>);�!�!span class="d_comment">/Xë0ª0ü0à</span><span class="d_comment">/XëGet maximum index with minIndex </span>writeln(a.<span class="d_psymbol">minIndex<ztpan>Àspan class="d_string">"a�.�.�.gt; b"</span>); <span class="d_comment">]å 2 <ztpan> <span class="d_comment">/XëRange is empty, so return value is -1 </span><span class="d_keyword">int</span>[] b; writeln(b.<span class="d_psymbol">minIndex<ztpan>);�!�!span class="d_comment">/Xë-1 <ztpan> <span class="d_comment">/XëWorks with more custom�4ypes <ztpan><span class="d_keyword">struct</span> Dog { <span class="d_keyword">int<ztpan> age; } Dog[] dogs = [Dog(10), Dog(5), Dog(15)]; writeln(dogs.<span class="d_psymbol">minIndex</span>!<span class="d_string">"a.age < b.age"<ztpan>);�!�!span class="d_comment">/Xë1 </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".maxIndex"><ztpan><div class="quickindex" id="quickindex.maxIndex"><u(iv>ptrdiff_t�!�!span class="def-anchor" id="maxIndex"></span><code class="ddoc_psymbol">maxIndex</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a < b"+"+ Range)<ztpan>(Range�!�!code class="ddoc_param">range<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0ange�.�.�.amp;& �XsInfinite!Range && is(typeof(binaryFun�ired(<code class="ddoc_param">range</code>.front,�!�!code class="ddoc_param">range<uode>.front))))</span>; <br><u(iv><u(t> <dd><div class="summary">Computes�4he index of the first occurrence of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>'s maximum element. <u(iv><div class="val"><p class="keyval Section"><span class="key keySection">Complexity<ztpan> <span class="bigoh">Ο(<span class="d_inlinecode donthyphenate notranslate">range<ztpan>)<ztpan> Exactly�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code>.length - 1</span> comparisons are needed. <y:><u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The ordering predicate to�5se�4o determine the maximum element.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">range</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isInputRange">input range<tæ> to search.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">The index of the first encounter of�4he maximum in <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span>.�!�?f the <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range<uode></span> is empty, -1 is returned. <u(iv><u(iv> <div class="val"><p class="keyval Section"><span class="key keySection">Limitations<ztpan> If at least one of the arguments is NaN, the result is an�5nspecified�6alue. See <a href="std_algorithm_searching.html#.maxElement"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.searching.maxElement</span><tæ> for examples on how to cope with NaNs. </p></div> <div class="keyval SeeAlso"><span class="key keySeeAlso">See Also:<ztpan>�!�!div class="val�6alSeeAlso"><a href="#minIndex"><span class="d_inlinecode donthyphenate notranslate">minIndex</span><tæ>,�!�!a href="std_algorithm_comparison.html#.max"><span class="d_inlinecode donthyphenate notranslate">std.algorithm.comparison.max<ztpan></a>, <a href="#maxCount"><span class="d_inlinecode donthyphenate notranslate">maxCount<ztpan></a>, <a href="#maxElement"><span class="d_inlinecode donthyphenate notranslate">maxElement<ztpan></a>, <a href="#maxPos"><span class="d_inlinecode donthyphenate notranslate">maxPos<ztpan></a></div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_comment">]å Maximum is 4 and first occurs in position 2 <ztpan><span class="d_keyword">int<ztpan>[] a = [�(l4�) 2 2, 4, 1, �(l4�) 2 2 2, 1, 1, �3�3; writeln(a.<span class="d_psymbol">maxIndex</span>); <span class="d_comment">]å 2 <ztpan> <span class="d_comment">/XëEmpty range </span><span class="d_keyword">int</span>[] b; writeln(b.<span class="d_psymbol">maxIndex<ztpan>);�!�!span class="d_comment">/Xë-1 <ztpan> <span class="d_comment">/XëWorks with more custom�4ypes <ztpan><span class="d_keyword">struct</span> Dog { <span class="d_keyword">int<ztpan> age; } Dog[] dogs = [Dog(10), Dog(15), Dog(5)]; writeln(dogs.<span class="d_psymbol">maxIndex</span>!<span class="d_string">"a.age < b.age"<ztpan>);�!�!span class="d_comment">/Xë1 </span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".skipOver"><ztpan><div class="quickindex" id="quickindex.skipOver"><u(iv>template <span class="def-anchor" id="skipOver"><ztpan><code class="ddoc_psymbol">skipOver<uode>(alias�0red = (a, b) => a == b)<br></div></dt> <dd><div class="summary">Skip over�4he initial�0ortion of the first given range (<span class="d_inlinecode donthyphenate notranslate">haystack</span>)�4hat matches any of�4he additionally given ranges (<span class="d_inlinecode donthyphenate notranslate">needles</span>) fully, or if no second range is given skip over�4he elements that fulfill�0red. Do nothing if�4here is no match. </div><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">The�0redicate�4hat determines�7hether elements from each respective range match. Defaults�4o equality�!�!span class="d_inlinecode donthyphenate notranslate">"a == b"</span>.</td><zËr> <zËable><u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.algorithm.comparison : equal; <span class="d_keyword">auto</span> s1 =�!�!span class="d_string">"Hello�7orld"<ztpan>; <span class="d_keyword">assert</span>(Àspan class="d_psymbol">skipOver<ztpan>(s1,�!�!span class="d_string">"Ha"</span>)); writeln(s1); <span class="d_comment">]å "Hello world" <ztpan><span class="d_keyword">assert</span>(<span class="d_psymbol">skipOver</span>(s1, <span class="d_string">"Hell"<ztpan>) && s1 ==�!�!span class="d_string">"o�7orld"<ztpan>, s1); string[] r1 = [<span class="d_string">"abc"</span>,�!�!span class="d_string">"def"<ztpan>, <span class="d_string">"hij"</span>]; dstring[] r2 = [<span class="d_string">"abc"d<ztpan>]; <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">skipOver</span>!((a, b) => a.equal(b))(r1, [<span class="d_string">"def"d</span>]), rm0]); writeln(r1); <span class="d_comment">]å ["abc"+"+ "def", "hij"] <ztpan><span class="d_keyword">assert</span>(<span class="d_psymbol">skipOver</span>!((a, b) => a.equal(b))(r1, r2)); writeln(r1);�!�!span class="d_comment">/Xë["def", "hij"] <ztpan></pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.ascii : isWhite; <span class="d_keyword">import</span> std.range.primitives : empty; <span class="d_keyword">auto<ztpan> s�(N��)= <span class="d_string">"\t\tvalue"</span>; <span class="d_keyword">auto<ztpan> s0µ0ó0Á0ü0à= <span class="d_string">""<ztpan>; <span class="d_keyword">auto</span> s4 =�!�!span class="d_string">"\t\t\t"</span>; <span class="d_keyword">assert<ztpan>(s�(‘Ñ�)<span class="d_psymbol">skipOver</span>!isWhite && s�(N��)==�!�!span class="d_string">"value"<ztpan>); <span class="d_keyword">assert<ztpan>(!s3.<span class="d_psymbol">skipOver<ztpan>�XsWhite); <span class="d_keyword">assert<ztpan>(s4.<span class="d_psymbol">skipOver</span>!isWhite && s0Ô0¢0¹0È0ëempty); </pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples">Variadic skipOver <pre class="d_code notranslate"><span class="d_keyword">auto<ztpan> s =�!�!span class="d_string">"Hello�7orld"<ztpan>; <span class="d_keyword">assert</span>(Àspan class="d_psymbol">skipOver<ztpan>(s, <span class="d_string">"hello"</span>,�!�!span class="d_string">"HellO"<ztpan>)); writeln(s); <span class="d_comment">]å "Hello world" <ztpan> <span class="d_comment">/Xëthe range is skipped over the longest matching needle is skipped <ztpan><span class="d_keyword">assert</span>(<span class="d_psymbol">skipOver</span>(s,�!�!span class="d_string">"foo"<ztpan>, <span class="d_string">"hell"<ztpan>, <span class="d_string">"Hello "<ztpan>)); writeln(s); <span class="d_comment">]å "world" <ztpan></pre> <u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.algorithm.comparison : equal; <span class="d_keyword">auto</span> s1 =�!�!span class="d_string">"Hello�7orld"<ztpan>; <span class="d_keyword">assert</span>(Àspan class="d_psymbol">skipOver<ztpan>(s1, 'a')); writeln(s1);�!�!span class="d_comment">/Xë"Hello�7orld" </span><span class="d_keyword">assert<ztpan>(<span class="d_psymbol">skipOver<ztpan>(s1, 'H') && s1 ==�!�!span class="d_string">"ello world"</span>); string[] r = [<span class="d_string">"abc"<ztpan>, <span class="d_string">"def"</span>,�!�!span class="d_string">"hij"<ztpan>]; dstring e =�!�!span class="d_string">"abc"d</span>; <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">skipOver</span>!((a, b) => a.equal(b))(r,�!�!span class="d_string">"def"d</span>)); writeln(r);�!�!span class="d_comment">/Xë["abc", "def"+"+ "hij"] </span><span class="d_keyword">assert<ztpan>(<span class="d_psymbol">skipOver<ztpan>�Z(a, b) => a.equal(b))(r, e)); writeln(r);�!�!span class="d_comment">/Xë["def", "hij"] <ztpan> <span class="d_keyword">auto<ztpan> s�(N��)= <span class="d_string">""<ztpan>; <span class="d_keyword">assert</span>(�i�v�(‘Ñ�)<span class="d_psymbol">skipOver</span>('a')); <y:re> </div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples">Partial instantiation <pre class="d_code notranslate"><span class="d_keyword">import</span> std.ascii : isWhite; <span class="d_keyword">import<ztpan> std.range.primitives : empty; <span class="d_keyword">alias<ztpan>�7hitespaceSkiper = <span class="d_psymbol">skipOver</span>!isWhite; <span class="d_keyword">auto</span> s2 =�!�!span class="d_string">"\t\tvalue"<ztpan>; <span class="d_keyword">auto</span> s3 =�!�!span class="d_string">""</span>; <span class="d_keyword">auto<ztpan> s4 = <span class="d_string">"\t\t\t"<ztpan>; <span class="d_keyword">assert</span>(whitespaceSkiper(s�(SA�)�.�.�.amp;& s2 == <span class="d_string">"value"</span>); <span class="d_keyword">assert</span>(�v�i�i�ihitespaceSkiper(s2)); <span class="d_keyword">assert</span>(whitespaceSkiper(s4)�.�.�.amp;& s3.empty); <y:re> </div></div> <dl><dt class="d_decl"><div ><span class="def-anchor" id=".skipOver.skipOver"></span><div class="quickindex" id="quickindex.skipOver.skipOver"><u(iv>bool <span class="def-anchor" id="skipOver"><ztpan><code class="ddoc_psymbol">skipOver<uode><span class="template_param_list" title="Template parameter list">(Haystack, Needles...)</span>(ref Haystack�!�!code class="ddoc_param">haystack</code>, Needles�!�!code class="ddoc_param">needles<uode>)<br><span class="constraint">if (is(typeof(binaryFun!pred(<code class="ddoc_param">haystack</code>.front,�!�!code class="ddoc_param">needles<uode>[0].front)))�.�.�.amp;& isForwardRange�iaystack && allSatisfy!(isInputRange, Needles) && !is(CommonType!(staticMap�ZElementType, staticMap�ZUnqual, Needles))) == void))</span>; <br><br>bool <span class="def-anchor" id="skipOver"><ztpan><code class="ddoc_psymbol">skipOver<uode><span class="template_param_list" title="Template parameter list">(R)<ztpan>(ref R�!�!code class="ddoc_param">r1</code>)<br><span class="constraint">if (isForwardRange!R && ifTestable!(typeof(<code class="ddoc_param">r²uode>.front),�5naryFun!pred))</span>; <br><br>bool <span class="def-anchor" id="skipOver"><ztpan><code class="ddoc_psymbol">skipOver<uode><span class="template_param_list" title="Template parameter list">(R, Es...)</span>(ref R <code class="ddoc_param">r</code>, Es <code class="ddoc_param">es<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">r<uode>.front, <code class="ddoc_param">es<uode>[0]))))<ztpan>; <br></div></dt> <dd><div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">Haystack�!�!code class="ddoc_param">haystack</code><zËd> <td class="param_desc">The <a href="std_range_primitives.html#.isForwardRange">forward range<tæ> to move forward.<zËd></tr> <tr class="param"><td class="param_id">Needles�!�!code class="ddoc_param">needles<uode></td> <td class="param_desc">The�!�!a href="std_range_primitives.html#.isInputRange">input ranges<tæ> representing�4he�0refix of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">r²uode></span> to skip over.<zËd></tr> <tr class="param"><td class="param_id">Es <code class="ddoc_param">es<uode></td> <td class="param_desc">The element�4o match.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns"><span class="d_inlinecode donthyphenate notranslate">true</span> if�4he�0refix of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack<uode></span> matches any range of�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles</code><ztpan> fully or <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> evaluates�4o true, and <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> has been advanced�4o the point past�4his segment; otherwise false, and <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">haystack</code><ztpan> is left in its original�0osition. </div></div> <div class="val"><p class="keyval Section"><span class="key keySection">Note<ztpan> By definition, empty ranges are matched fully and if <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">needles<uode></span> contains an empty range, �!�!span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="skipOver"><ztpan><code class="ddoc_psymbol">skipOver<uode></span> will return <span class="d_inlinecode donthyphenate notranslate">true<ztpan>.<y:><u(iv> <u(d> <u(l> <u(d> <dt class="d_decl"><div� <span class="def-anchor" id=".startsWith"></span><div class="quickindex" id="quickindex.startsWith"></div>uint�!�!span class="def-anchor" id="startsWith"></span><code class="ddoc_psymbol">startsWith</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = (a, b) => a == b, Range, Needles...)</span>(Range <code class="ddoc_param">doesThisStart</code>, Needles�!�!code class="ddoc_param">withOneOfThese</code>)<br><span class="constraint">if (isInputRange!Range && (Needles.length�.�.�.gt; 1)�.�.�.amp;& allSatisfy�ZcanTestStartsWith!(pred, Range), Needles))</span>; <br><br>bool <span class="def-anchor" id="startsWith"><ztpan><code class="ddoc_psymbol">startsWith<uode><span class="template_param_list" title="Template parameter list">(alias�0red = "a == b", R1, R2)<ztpan>(R1 <code class="ddoc_param">doesThisStart</code>, R�(N��)<code class="ddoc_param">withThis<uode>)<br><span class="constraint">if (isInputRange�1 D�1�01 && isInputRange!R2�.�.�.amp;& is(typeof(binaryFun!pred(<code class="ddoc_param">doesThisStart<uode>.front, <code class="ddoc_param">withThis<uode>.front)) : bool))<ztpan>; <br><br>bool�!�!span class="def-anchor" id="startsWith"></span><code class="ddoc_psymbol">startsWith</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ R, E)</span>(R <code class="ddoc_param">doesThisStart</code>, E�!�!code class="ddoc_param">withThis</code>)<br><span class="constraint">if (isInputRange!R && is(typeof(binaryFun�ired(<code class="ddoc_param">doesThisStart</code>.front,�!�!code class="ddoc_param">withThis</code>)) : bool))</span>; <br><br>bool <span class="def-anchor" id="startsWith"><ztpan><code class="ddoc_psymbol">startsWith<uode><span class="template_param_list" title="Template parameter list">(alias�0red, R)<ztpan>(R�!�!code class="ddoc_param">doesThisStart<uode>)<br><span class="constraint">if (isInputRange�1 D�1�0�.�.�.amp;& ifTestable�Ztypeof(<code class="ddoc_param">doesThisStart<uode>.front),�5naryFun!pred))</span>; <br><u(iv><u(t> <dd><div class="summary">Checks�7hether�4he given <a href="std_range_primitives.html#.isInputRange">input range</a> starts with (one of) the given needle(s) or, if no needles are given, if its front element fulfils predicate <span class="d_inlinecode donthyphenate notranslate">pred<ztpan>. </div><div class="description">For more information about <span class="d_inlinecode donthyphenate notranslate">pred<ztpan> see�!�!a href="#find"><span class="d_inlinecode donthyphenate notranslate">find</span><tæ>. </div> <div class="keyval Parameters"><span class="key keyParameters">Parameters:<ztpan>�!�!div class="val�6alParameters"><table class="params"><tr class="param"><td class="param_id">pred<zËd> <td class="param_desc">Predicate to�5se in comparing the elements of the haystack and�4he needle(s). Mandatory if no needles are given.</td><zËr> <tr class="param"><td class="param_id">Range <code class="ddoc_param">doesThisStart</code><zËd> <td class="param_desc">The input range to check.<zËd></tr> <tr class="param"><td class="param_id">Needles�!�!code class="ddoc_param">withOneOfThese</code><zËd> <td class="param_desc">The needles against which the range is�4o be checked, which may be individual elements or input ranges of elements.<zËd></tr> <tr class="param"><td class="param_id">R�(N��)<code class="ddoc_param">withThis<uode></td> <td class="param_desc">The single needle�4o check,�7hich may be either a single element or an input range of elements.</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">0 if the needle(s) do not occur at the beginning of�4he given range; otherwise the position of the matching needle,�4hat is, 1 if�4he range starts with�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">withOneOfThese<uode>[0]<ztpan>, �(N��)if it starts�7ith <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">withOneOfThese</code>[o</span>, and so on. <div class="blankline"><u(iv> In the case�7here�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">doesThisStart</code><ztpan> starts with multiple of�4he ranges or elements in�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">withOneOfThese<uode></span>,�4hen the shortest one matches (if�4here are two�7hich match�7hich are of the same length (e.g. <span class="d_inlinecode donthyphenate notranslate">"a"</span> and <span class="d_inlinecode donthyphenate notranslate">'a'</span>), then the left-most of them in the argument list matches). <div class="blankline"><u(iv> In the case�7hen no needle parameters are given, return�!�!span class="d_inlinecode donthyphenate notranslate">true</span> iff front of <span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">doesThisStart</code><ztpan> fulfils�0redicate�!�!span class="d_inlinecode donthyphenate notranslate">pred</span>.</div></div> <span class="dlang_runnable"></span><div class="keyval Examples"><span class="key keyExamples">Examples:<ztpan>�!�!div class="val�6alExamples"><pre class="d_code notranslate"><span class="d_keyword">import</span> std.ascii : isAlpha; <span class="d_keyword">assert</span>(<span class="d_string">"abc"</span>.<span class="d_psymbol">startsWith</span>!(a => a.isAlpha)); <span class="d_keyword">assert</span>(<span class="d_string">"abc"</span>.<span class="d_psymbol">startsWith</span>!isAlpha); <span class="d_keyword">assert</span>(Àspan class="d_string">"1ab"<ztpan>.<span class="d_psymbol">startsWith<ztpan>�Za => a.isAlpha)); <span class="d_keyword">assert<ztpan>(!<span class="d_string">""<ztpan>.<span class="d_psymbol">startsWith<ztpan>�Za => a.isAlpha)); <span class="d_keyword">import</span> std.algorithm.comparison : among; <span class="d_keyword">assert</span>(<span class="d_string">"abc"</span>.<span class="d_psymbol">startsWith</span>!(a => a.among('a', 'b') != 0)); <span class="d_keyword">assert<ztpan>(!<span class="d_string">"abc"</span>.<span class="d_psymbol">startsWith</span>!(a => a.among('b', 'c') != 0)); <span class="d_keyword">assert</span>(<span class="d_psymbol">startsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">""</span>)); <span class="d_keyword">assert<ztpan>(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"a"</span>)); <span class="d_keyword">assert<ztpan>(!<span class="d_psymbol">startsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"b"<ztpan>)); writeln(<span class="d_psymbol">startsWith</span>(<span class="d_string">"abc"</span>, 'a', <span class="d_string">"b"</span>));�!�!span class="d_comment">/Xë1 </span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"b"</span>,�!�!span class="d_string">"a"<ztpan>)); <span class="d_comment">]å 2 <ztpan>writeln(<span class="d_psymbol">startsWith</span>(<span class="d_string">"abc"</span>,�!�!span class="d_string">"a"<ztpan>, <span class="d_string">"a"</span>));�!�!span class="d_comment">/Xë1 </span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"ab"<ztpan>, <span class="d_string">"a"</span>));�!�!span class="d_comment">/Xë�(�)</span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"x"</span>,�!�!span class="d_string">"a"<ztpan>, <span class="d_string">"b"</span>));�!�!span class="d_comment">/Xë�(�)</span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"x"</span>,�!�!span class="d_string">"aa"</span>,�!�!span class="d_string">"ab"</span>));�!�!span class="d_comment">/Xë0ª0ü0à</span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"x"</span>,�!�!span class="d_string">"aaa"<ztpan>, <span class="d_string">"sab"</span>));�!�!span class="d_comment">/Xë0 </span>writeln(<span class="d_psymbol">startsWith<ztpan>(<span class="d_string">"abc"<ztpan>, <span class="d_string">"x"</span>,�!�!span class="d_string">"aaa"<ztpan>, <span class="d_string">"a"</span>,�!�!span class="d_string">"sab"<ztpan>)); <span class="d_comment">]å 2 2 <ztpan> <span class="d_keyword">import<ztpan> std.typecons : Tuple; <span class="d_keyword">alias</span> C = Tuple!(<span class="d_keyword">int</span>,�!�!span class="d_string">"x"<ztpan>, <span class="d_keyword">int<ztpan>, <span class="d_string">"y"</span>); <span class="d_keyword">assert</span>(<span class="d_psymbol">startsWith</span>!<span class="d_string">"a.x == b"<ztpan>([ C(1,1), C(1,2), C(2,2) ], [1, 1])); writeln(<span class="d_psymbol">startsWith<ztpan>Àspan class="d_string">"a.x == b"</span>([C(1, 1), C(�(l4�) 1), C(2, �(SA�)], [1, 1], [1, 2], [1, 2 2]));�!�!span class="d_comment">/Xë�(�)</span><y:re> </div></div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".OpenRight"></span><div class="quickindex" id="quickindex.OpenRight"><u(iv>alias�!�!span class="def-anchor" id="OpenRight"><ztpan><code class="ddoc_psymbol">OpenRight</code> = std.typecons.Flag!"openRight".Flag; <br></div></dt> <dd><div class="summary">Interval option specifier for�!�!span class="d_inlinecode donthyphenate notranslate">until<ztpan> (below) and others. <u(iv><div class="description">If set�4o <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="OpenRight"><ztpan><code class="ddoc_psymbol">OpenRight</code>.yes<ztpan>, then�4he interval is open to�4he right (last element is not included). <div class="blankline"></div> Otherwise if set�4o <span class="d_inlinecode donthyphenate notranslate"><span class="def-anchor" id="OpenRight"><ztpan><code class="ddoc_psymbol">OpenRight</code>.no</span>,�4hen the interval is closed�4o the right including the entire sentinel.</div> </dd> <dt class="d_decl"><div ><span class="def-anchor" id=".until"></span><div class="quickindex" id="quickindex.until"><u(iv>Until�Zpred, Range, Sentinel)�!�!span class="def-anchor" id="until"><ztpan><code class="ddoc_psymbol">until</code><span class="template_param_list"�4itle="Template�0arameter list">(alias pred = "a == b"+"+ Range, Sentinel)<ztpan>(Range�!�!code class="ddoc_param">range<uode>, Sentinel�!�!code class="ddoc_param">sentinel</code>, OpenRight�!�!code class="ddoc_param">openRight<uode> = Yes.<code class="ddoc_param">openRight<uode>)<br><span class="constraint">if (�Xs(Sentinel == OpenRight))<ztpan>; <br><br>Until!(pred, Range, void) <span class="def-anchor" id="until"></span><code class="ddoc_psymbol">until<uode><span class="template_param_list" title="Template parameter list">(alias�0red, Range)<ztpan>(Range�!�!code class="ddoc_param">range<uode>, OpenRight <code class="ddoc_param">openRight</code> = Yes.<code class="ddoc_param">openRight</code>); <br><br><span class="def-anchor" id=".Until"><ztpan><div class="quickindex" id="quickindex.Until"></div>struct�!�!span class="def-anchor" id="Until"><ztpan><code class="ddoc_psymbol">Until</code>(alias pred, Range, Sentinel) if (isInputRange!Range); <br></div></dt> <dd><div class="summary">Lazily iterates�!�!span class="d_inlinecode donthyphenate notranslate"><code class="ddoc_param">range</code><ztpan>�5ntil�4he element�!�!span class="d_inlinecode donthyphenate notranslate">e<ztpan> for�7hich <span class="d_inlinecode donthyphenate notranslate">pred(e, <code class="ddoc_param">sentinel<uode>)<ztpan> is true. </div><div class="description">This is similar�4o <span class="d_inlinecode donthyphenate notranslate">takeWhile</span> in other languages. <u(iv> <div class="keyval Parameters"><span class="key keyParameters">Parameters:</span> <div class="val valParameters"><table class="params"><tr class="param"><td class="param_id">pred</td> <td class="param_desc">Predicate�4o determine when�4o stop.<zËd></tr> <tr class="param"><td class="param_id">Range�!�!code class="ddoc_param">range<uode></td> <td class="param_desc">The�!�!a href="std_range_primitives.html#.isInputRange">input range</a> �4o iterate over.<zËd></tr> <tr class="param"><td class="param_id">Sentinel <code class="ddoc_param">sentinel<uode></td> <td class="param_desc">The element�4o stop at.</td><zËr> <tr class="param"><td class="param_id">OpenRight <code class="ddoc_param">openRight</code><zËd> <td class="param_desc">Determines�7hether�4he element for�7hich�4he given�0redicate is true should be included in�4he resulting range (<span class="d_inlinecode donthyphenate notranslate">No.<code class="ddoc_param">openRight</code><ztpan>), or not (<span class="d_inlinecode donthyphenate notranslate">Yes.<code class="ddoc_param">openRight</code><ztpan>).</td><zËr> <zËable><u(iv><u(iv> <div class="keyval Returns"><span class="key keyReturns">Returns:<ztpan>�!�!div class="val�6alReturns">An <a href="std_range_primitives.html#.isInputRange">input range<tæ> that iterates over�4he original range's elements, but ends�7hen the specified predicate becomes true. If�4he original range is a �!�!a href="std_range_primitives.html#.isForwardRange">forward range</a> or higher, this range�7ill be a forward range.<u(iv><u(iv> <span class="dlang_runnable"><ztpan><div class="keyval Examples"><span class="key keyExamples">Examples:</span> <div class="val valExamples"><pre class="d_code notranslate"><span class="d_keyword">import<ztpan> std.algorithm.comparison : equal; <span class="d_keyword">import<ztpan> std.typecons : No; <span class="d_keyword">int<ztpan>[] a = [ 1, �(l4�) 2 2 2, 7, 5 5 5, �(l4�) 2 2 2, 7, 2 2, 5]; <span class="d_keyword">assert</span>(equal(a.<span class="d_psymbol">until<ztpan>(7), [1, 2, 4])); <span class="d_keyword">assert</span>(equal(a.<span class="d_psymbol">until<ztpan>(7, No.<span class="d_param">openRight</span>), [1, �(l4�) 2 2 2, 7])); </pre> <u(iv><u(iv> <u(d> <u(l> <div class="smallprint" id="copyright">Copyright�.�.�.copy; 99-2025 by�4he�!�!a href="..u‹oundation_overview.html">D Language Foundation</a>�= Page generated by <a href="..ztpec/ddoc.html">Ddoc<tæ> on Fri Oct 10 �(g �):1SE�(y>�) 2025 �<u(iv> </div> <u(iv> �!�!script�4ype="text/javascript" src="https:/tæjax.googleapis.comtæjax/libsv®query/1.7.�(W�)jquery.min.js"><ztcript> �!�!script�4ype="text/javascript">window.jQuery || document.write('\x3Cscript src="../jsv®query-1.7.�(‘Ñ�)min.js">\x0Þ0¤0¯0íztcript>');<ztcript> �!�!script�4ype="text/javascript" src="../jsu(lang.js"><ztcript> � <script type="textv®avascript" src="..v®s/codemirror-compressed.js"></script> <script type="textv®avascript" src="..v®s/run.js"></script> <script type="textv®avascript" src="..v®s/run_examples.js"><ztcript> <script type="textv®avascript" src="..v®s/listanchors.js"></script> <script type="textv®avascript" src="..v®s/show_contributors.js"></script> <script type="textv®avascript">jQuery(document).ready(listanchors);<ztcript> <link rel="stylesheet" href="https:]åmaxcdn.bootstrapcdn.com/font-awesome^.4.0ussu‹ont-awesome.min.css"> </body> </html> �<�/�d�i�v�>�<�d�i�v� �c�l�a�s�s�=�"�n�a�k�e�d�_�c�t�r�l�"�>� �<�f�o�r�m� �a�c�t�i�o�n�=�"�/�i�n�d�e�x�.�c�g�i�/�l�a�r�g�e�r�-�t�e�x�t�"� �m�e�t�h�o�d�=�"�g�e�t�"� �n�a�m�e�=�"�g�a�t�e�"�>� �<�p�>�<�a� �h�r�e�f�=�"�h�t�t�p�:�/�/�a�l�t�s�t�y�l�e�.�a�l�f�a�s�a�d�o�.�n�e�t�"�>�A�l�t�S�t�y�l�e�<�/�a�>� 0k0ˆ0c0fY cÛ0U0Œ0_0Ú0ü0¸� �<�a� �h�r�e�f�=�"�h�t�t�p�s�:�/�/�d�l�a�n�g�.�o�r�g�/�p�h�o�b�o�s�/�s�t�d�_�a�l�g�o�r�i�t�h�m�_�s�e�a�r�c�h�i�n�g�.�h�t�m�l�"�>�(�-�&�g�t�;0ª0ê0¸0Ê0ë�)�<�/�a�>� �/� �<�l�a�b�e�l�>0¢0É0ì0¹�:� �<�i�n�p�u�t� �t�y�p�e�=�"�t�e�x�t�"� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�u�r�l�"� �v�a�l�u�e�=�"�h�t�t�p�s�:�/�/�d�l�a�n�g�.�o�r�g�/�p�h�o�b�o�s�/�s�t�d�_�a�l�g�o�r�i�t�h�m�_�s�e�a�r�c�h�i�n�g�.�h�t�m�l�"� �s�i�z�e�=�"�2�2�"� �/�>�<�/�l�a�b�e�l�>� �<�l�a�b�e�l�>0â0ü0É�:� �<�s�e�l�e�c�t� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�m�o�d�e�"�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�d�e�f�a�u�l�t�"�>0Ç0Õ0©0ë0È�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�s�p�e�e�c�h�"�>—óXð0Ö0é0¦0¶�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�r�u�b�y�"�>0ë0ÓNØ0M�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�c�o�n�t�r�a�s�t�"�>‘M‚rSÍŽâ�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�l�a�r�g�e�r�-�t�e�x�t�"� �s�e�l�e�c�t�e�d�=�"�s�e�l�e�c�t�e�d�"�>e‡[WbáY'�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�m�o�b�i�l�e�"�>0â0Ð0¤0ë�<�/�o�p�t�i�o�n�>� �<�/�s�e�l�e�c�t�>� �<�i�n�p�u�t� �t�y�p�e�=�"�s�u�b�m�i�t�"� �v�a�l�u�e�=�"ˆhy:�"� �/�>� �<�/�p�>� �<�/�f�o�r�m�>� �<�/�d�i�v�>� � �