Skip to content

util: Add string utils - #77

Open
Nitr4m12 wants to merge 1 commit into
open-ead:masterfrom
Nitr4m12:stringutil
Open

util: Add string utils#77
Nitr4m12 wants to merge 1 commit into
open-ead:masterfrom
Nitr4m12:stringutil

Conversation

@Nitr4m12

@Nitr4m12 Nitr4m12 commented Aug 22, 2026

Copy link
Copy Markdown

These are a bunch of functions I've found digging through DWARF info. In order to match, I decompiled a couple of functions that used them since all of them are inlined and are very much defined in the header. The games I checked with were Splatoon 2 (nw 1.6.0), SMO (nw 3.5.1) and Bloons TD 5 (nw 5.3.0).


This change is Reviewable

@Fuzzy2319 Fuzzy2319 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run clang-format there is some trailling whitespaces in your code.

Where did you find these functions? I can't find them in SMO's SDK nor in MK8DX's SDK.

@Fuzzy2319 reviewed 1 file and all commit messages, and made 2 comments.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on Nitr4m12).


include/nn/util/util_StringUtil.h line 3 at r1 (raw file):

namespace nn::util {
template <typename T>
inline int Strlcpy(T* pOutDst, const T* pSrc, int count) {

Please use types from <nn/types.h>
int -> s32

@Nitr4m12 Nitr4m12 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

These are from BTD5's debug build. They are inlined when used so they're not exported, and are only present in the DWARF info of the debug build (from what I can tell).

@Nitr4m12 reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on Fuzzy2319).


include/nn/util/util_StringUtil.h line 3 at r1 (raw file):

Previously, Fuzzy2319 wrote…

Please use types from <nn/types.h>
int -> s32

Done

The DWARF does not show them using typedefs, which is why I wasn't.

@Fuzzy2319 Fuzzy2319 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Fuzzy2319 reviewed 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Nitr4m12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants