wasm-demo/demo/ermis-f/python_m/cur/0013

21 lines
570 B
Plaintext

From: roy at popmail.med.nyu.edu (Roy Smith)
Date: Thu, 29 Apr 1999 14:02:40 -0400
Subject: padding strings
Message-ID: <roy-2904991402400001@qwerky.med.nyu.edu>
X-UID: 13
Given a string, I want to generate another string which is exactly N
characters long. If the first string is less than N, I want to blank-pad
it. If the first string is greater than N, I want to truncate it.
What's the most straight-forward way to do that?
--
Roy Smith <roy at popmail.med.nyu.edu>
New York University School of Medicine