code wiki / (root) / nx_str.nx

nx_str.nx

buildroot/runtime/nx_str.nx

6754 B221 linesdepth 3pulls 3 transitivereach 283 importersview sourcekind tooltopic str
docsdependenciesstructsconstsfunctions

about

nx_str.nx -- C-style string utilities (NUL-terminated bytes). Almost every NishiLang module re-implements strlen / streq / a scratch copy loop. Centralise the basic vocabulary here so all callers agree on edge-case handling (empty strings, prefix boundaries, NUL handling). Bytes are i64 in NishiLang (we don't have u8 scalars), but byte slots in arrays / pointed-to memory ARE u8. We treat every byte as 0..255 and never sign-extend. nx_strconv handles parse/format for integers; this module handles raw character-level operations.

dependencies 1 imports · 116 importers

syscalls.nx nx_str.nx _dlr_probe.nx _uj_probe.nx _wt_probe_one.nx nx_avatar_solve_test.nx nx_bench_harness.nx nx_bencode_test.nx nx_cap_census.nx nx_casc_runner_test.nx nx_checkpoint.nx nx_choker_test.nx

diagram shows first 10 each side; +0 more imports, +106 more importers in the complete lists below.

imports: syscalls.nx

imported by: _dlr_probe.nx_uj_probe.nx_wt_probe_one.nxnx_avatar_solve_test.nxnx_bench_harness.nxnx_bencode_test.nxnx_cap_census.nxnx_casc_runner_test.nxnx_checkpoint.nxnx_choker_test.nxnx_coe_consistency.nxnx_coe_dsse.nxnx_coe_frame.nxnx_coe_intoto.nxnx_coe_witness.nxnx_contactsheet.nxnx_content_measure_test.nxnx_crawl_bfs.nxnx_crawl_doc_test.nxnx_crawl_frontier_test.nxnx_crawl_https.nxnx_crawl_main.nxnx_crawl_polite.nxnx_crawl_run.nxnx_diora_dedup_demo.nxnx_diora_index_demo.nxnx_diora_live_reach.nxnx_diora_live_reach_guarded.nxnx_diora_live_serp.nxnx_docstore.nxnx_docstore_test.nxnx_emit_journal.nxnx_entity_discover.nxnx_entity_media.nxnx_entity_seeds.nxnx_evidence_gather.nxnx_facet_classify.nxnx_fetch_unit.nxnx_fof_cnf_test.nxnx_fof_parse.nxnx_fof_parse_test.nxnx_fof_tseitin_test.nxnx_gate_green.nxnx_gate_green_test.nxnx_h2_test_leaf.nxnx_hash_bench_test.nxnx_hpack.nxnx_html_links_test.nxnx_http_get_ua.nxnx_http_get_ua_test.nxnx_ignored_host_reach.nxnx_img_extract_demo.nxnx_imgfacts.nxnx_jpegprobe.nxnx_live_crawl.nxnx_live_https.nxnx_live_https_reach.nxnx_media_gather.nxnx_metainfo_test.nxnx_mock_web.nxnx_nist_unwall.nxnx_oeuvre_resolve.nxnx_ontology.nxnx_ontology_test.nxnx_patent_check.nxnx_patent_check_test.nxnx_peerwire_test.nxnx_pem_loader.nxnx_piece_manager_test.nxnx_provenance.nxnx_quality_gate.nxnx_rank_fused_test.nxnx_rate_ema_test.nxnx_revimg_crawl_run.nxnx_robots.nxnx_robots_test.nxnx_search_competitor_census.nxnx_search_crawl_server.nxnx_search_neutrality_gate.nxnx_search_server.nxnx_self_audit.nxnx_shard_writer.nxnx_simhash_test.nxnx_smtlib_parse.nxnx_smtlib_parse_test.nxnx_source_tier.nxnx_sovereign_qed_audit.nxnx_sreach_scorecard.nxnx_str_gate.nxnx_stream_picker_test.nxnx_swarm_sim_test.nxnx_theorem_registry.nxnx_theorem_registry_test.nxnx_torrent_bench_test.nxnx_torrent_competitor_census.nxnx_tptp.nxnx_tptp_emit.nxnx_tptp_emit_test.nxnx_tptp_formula.nxnx_tptp_formula_test.nx +16 more (shown cap 100 declared)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_str_len nx_str_eq nx_str_starts_with nx_str_ends_with nx_str_len ↻ nx_str_chr nx_str_rchr nx_str_len ↻ nx_str_str nx_str_len ↻ nx_str_cpy nx_str_cat nx_str_len ↻ nx_str_memset nx_str_memcmp

structs

none

consts

none

functions

23func nx_str_len(s: *u8) -> i64
30func nx_str_eq(a: *u8, b: *u8) -> i64
41func nx_str_cmp(a: *u8, b: *u8) -> i64
called by 1: main
54func nx_str_memcpy(dst: *u8, src: *u8, n: i64) -> *u8
called by 1: main
64func nx_str_memset(dst: *u8, v: i64, n: i64) -> *u8
called by 2: mainmain
74func nx_str_memcmp(a: *u8, b: *u8, n: i64) -> i64
called by 2: mainmain
84func nx_str_cpy(dst: *u8, src: *u8) -> *u8
96func nx_str_cat(dst: *u8, src: *u8) -> *u8
108func nx_str_chr(s: *u8, c: i64) -> i64
119func nx_str_rchr(s: *u8, c: i64) -> i64
called by 2: mainmain calls 1: nx_str_len
132func nx_str_str(hay: *u8, needle: *u8) -> i64
152func nx_str_starts_with(hay: *u8, pfx: *u8) -> i64
called by 2: mainmain
162func nx_str_ends_with(hay: *u8, sfx: *u8) -> i64
called by 2: mainmain calls 1: nx_str_len
176func main() -> i64