1"use strict";(self.webpackChunkmodular_fe=self.webpackChunkmodular_fe||[]).push([["16674"],{47982(n,e,t){t.r(e),t.d(e,{metadata:()=>s,default:()=>h,frontMatter:()=>r,contentTitle:()=>c,toc:()=>l,assets:()=>d});var s=JSON.parse('{"id":"docs/std/collections/string/string/chr","title":"chr","description":"Returns a String based on the given Unicode code point. This is the inverse of the `ord()` function.","source":"@site/versioned_docs/version-1.0.0/docs/std/collections/string/string/chr.md","sourceDirName":"docs/std/collections/string/string","slug":"/docs/std/collections/string/string/chr","permalink":"/1.0.0/docs/std/collections/string/string/chr","draft":false,"unlisted":false,"editUrl":"https://github.com/modular/modular/edit/main/Mojo/docs/site/std/collections/string/string/chr.md","tags":[],"version":"1.0.0","frontMatter":{"title":"chr","version":"1.0.0.dev0","slug":"chr","type":"function","namespace":"std.collections.string.string","lang":"mojo","show_stability_marker":null,"description":"Returns a String based on the given Unicode code point. This is the inverse of the `ord()` function."},"sidebar":"stdSidebar","previous":{"title":"atol","permalink":"/1.0.0/docs/std/collections/string/string/atol"},"next":{"title":"ord","permalink":"/1.0.0/docs/std/collections/string/string/ord"}}'),i=t(74848),o=t(28453);let r={title:"chr",version:"1.0.0.dev0",slug:"chr",type:"function",namespace:"std.collections.string.string",lang:"mojo",show_stability_marker:null,description:"Returns a String based on the given Unicode code point. This is the inverse of the `ord()` function."},c,d={},l=[];function a(n){let e={a:"a",b:"b",code:"code",div:"div",li:"li",p:"p",pre:"pre",section:"section",strong:"strong",ul:"ul",...(0,o.R)(),...n.components};return(0,i.jsxs)(e.section,{className:"mojo-docs",children:["\n",(0,i.jsxs)(e.div,{className:"mojo-function-detail",children:["\n",(0,i.jsxs)(e.div,{className:"mojo-function-sig",children:["\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.code,{children:"def chr(c: Int) -> String"})}),"\n"]}),"\n",(0,i.jsxs)(e.p,{children:["Returns a String based on the given Unicode code point. This is the inverse of the ",(0,i.jsx)(e.code,{children:"ord()"})," function."]}),"\n",(0,i.jsx)(e.p,{children:"This function is in the prelude, so you don't need to import it."}),"\n",(0,i.jsx)(e.p,{children:"Example:"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-mojo",children:'print(chr(97), chr(8364)) # "a \u20AC"\n'})}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:"Args:"})}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["\u200B",(0,i.jsx)(e.b,{children:"c"})," (",(0,i.jsx)(e.a,{href:"../../../../../../docs/std/builtin/simd/#int",children:(0,i.jsx)(e.code,{children:"Int"})}),"): An integer that represents a code point."]}),"\n"]}),"\n",(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:"Returns:"})}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.a,{href:"../../../../../../docs/std/collections/string/string/String",children:(0,i.jsx)(e.code,{children:"String"})}),": A string containing a single character based on the given code point."]}),"\n"]}),"\n"]})}function h(n={}){let{wrapper:e}={...(0,o.R)(),...n.components};return e?(0,i.jsx)(e,{...n,children:(0,i.jsx)(a,{...n})}):a(n)}},28453(n,e,t){t.d(e,{R:()=>r,x:()=>c});var s=t(96540);let i={},o=s.createContext(i);function r(n){let e=s.useContext(o);return s.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function c(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:r(n.components),s.createElement(o.Provider,{value:e},n.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.