# HG changeset patch # User Rik # Date 1362521016 28800 # Node ID 576daea679febafceba220676eb750d3499b0b65 # Parent 5bcae3970d9d7970c0d24b34ef922e4d6de064d7 num2str.m: Clarify in docstring that leading spaces will be trimmed (bug #38463) * scripts/general/num2str.m: Clarify in docstring that leading spaces will be trimmed (bug #38463). diff --git a/scripts/general/num2str.m b/scripts/general/num2str.m --- a/scripts/general/num2str.m +++ b/scripts/general/num2str.m @@ -24,8 +24,9 @@ ## optional second argument may either give the number of significant ## digits (@var{precision}) to be used in the output or a format ## template string (@var{format}) as in @code{sprintf} (@pxref{Formatted -## Output}). @code{num2str} can also handle complex numbers. For -## example: +## Output}). @code{num2str} can also handle complex numbers. +## +## Examples: ## ## @example ## @group @@ -50,11 +51,17 @@ ## @end group ## @end example ## +## Notes: +## +## For Matlab compatibility, leading spaces are stripped before returning +## the string. +## ## The @code{num2str} function is not very flexible. For better control ## over the results, use @code{sprintf} (@pxref{Formatted Output}). -## Note that for complex @var{x}, the format string may only contain one -## output conversion specification and nothing else. Otherwise, you -## will get unpredictable results. +## +## For complex @var{x}, the format string may only contain one +## output conversion specification and nothing else. Otherwise, results +## will be unpredictable. ## @seealso{sprintf, int2str, mat2str} ## @end deftypefn