MPILNB(3NCARG)

✨ MPILNB ✨ (that's a function in the NCAR GRAPHICS manual, bestie, section 3NCARG πŸ’–)

okay so. bestie. listen. you ever have a string and you're like "where does the actual content end and the blank padding begin"?? because FORTRAN strings are like. fixed width. they're giving full-length-character-array energy, they don't trim themselves, they do NOT have main character instincts. 🫢

and that's literally where MPILNB comes in. she's a tiny lil utility function whose whole job β€” her entire purpose, her moment β€” is finding the index of the last non-blank character in a character string. that's it. that's the whole function. she's small but she ate. πŸ’…


🌸 NAME 🌸

MPILNB β€” a simple lil utility function that finds the index of the last non-blank character in a character string. no cap. πŸŽ€


✨ SYNOPSIS ✨

ILNB=MPILNB(CHRS)

πŸ’œ C-BINDING SYNOPSIS πŸ’œ

#include <ncarg/ncargC.h>

int c_mpilnb (char *chrs)

πŸ¦‹ DESCRIPTION πŸ¦‹

  • CHRS β€” is an input expression of type CHARACTER. that's it, that's the whole input list, she's low maintenance. 🌈

🧚 C-BINDING DESCRIPTION 🧚

the C-binding argument description is the same as the FORTRAN argument description. periodt. same vibe, different language, no drama. πŸ’–


πŸ”₯ USAGE πŸ”₯

so the statement

ILNB=MPILNB(CHRS)

sets the value of ILNB to the index β€” between 1 and LEN(CHRS) β€” of the last non-blank character in the character string CHRS. like, she scans from the back, she finds the last character that isn't just a sad little space, and she hands you her position number. iconic behavior honestly. πŸ‘‘

heads up: the index lives in the range 1 to LEN(CHRS), so it's a real position inside your string, not a zero-based situation, not an offset, not vibes. πŸ“

πŸ™ˆ EXAMPLES πŸ™ˆ

none. nope. zero examples. the manpage said "None." and honestly? she's self-explanatory, she doesn't need a whole demo reel. 😭


🌟 ACCESS 🌟

to use MPILNB or c_mpilnb, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. don't be chaotic about the order, bestie, the order matters. ⭐


πŸ’€ SEE ALSO πŸ’€

online: ezmap, ezmap_params, mapaci, mapbla, mapblm, mapdrw, mapeod, mapfst, mapgci, mapgrd, mapgrm, mapgtc, mapgti, mapgtl, mapgtr, mapint, mapiq, mapiqa, mapiqd, mapiqm, mapit, mapita, mapitd, mapitm, maplbl, maplmb, maplot, mappos, maproj, maprs, maprst, mapsav, mapset, mapstc, mapsti, mapstl, mapstr, maptra, maptri, maptrn, mapusr, mapvec, mpchln, mpfnme, mpgetc, mpgeti, mpgetl, mpgetr, mpglty, mpiaty, mpifnb, mpiola, mpiosa, mpipai, mpipan, mpipar, mpisci, mplnam, mplndm, mplndr, mplnri, mpname, mprset, mpsetc, mpseti, mpsetl, mpsetr, supmap, supcon, ncarg_cbind

(yeah that's a lot of friends. she's got a whole group chat. iykyk. πŸŽ€)


Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
fr fr, this software is governed by a License Agreement β€” so read it, don't just scroll past it. πŸ’œ

and that's the whole page, bestie!! πŸ¦‹ this was the NCAR GRAPHICS manual, MPILNB(3NCARG), living on UNIX, dated April 1998 ✨ β€” yes she's an elder but she still serves πŸ’…πŸŒΈ take care of her and she'll find your last non-blank character every single time πŸ«ΆπŸ’–